Transcription of Adafruit NeoPixel Überguide
1 Adafruit NeoPixel berguideCreated by Phillip Burgess updated on 2022-01-17 01:24:06 PM EST Adafruit IndustriesPage 1 of 8455778101112131415151717202020202223242 4252526272728282829292929303030313233333 43538 Table of ContentsThe Magic of NeoPixels Important Things to Know About NeoPixels in GeneralForm FactorsNeoPixel Strips and Strands RGB NeoPixel Strips Mini Skinny RGB NeoPixel Strips Side-Light NeoPixel Strips RGBW NeoPixel Strips Neon-Like NeoPixel Flex Strip Ultraviolet NeoPixel Strips NeoPixel Strands Finer Details About NeoPixel StripsNeoPixel Rings NeoPixel Ring Product Selector Finer Details About NeoPixel RingsNeoPixel Matrices Rigid 8x8 NeoPixel Matrices NeoPixel Matrix Product Selector Flexible NeoPixel Matrices Finer Details About NeoPixel Matrices We also have a few special-purpose matrices on the NeoPixel Shields page! NeoPixel Shields NeoPixel Shield for Arduino NeoPixel Shield Product Selector NeoPixel FeatherWing Pimoroni Unicorn Hat Particle/Spark NeoPixel Ring KitOther NeoPixel Shapes NeoPixel Stick NeoPixel Stick Product Selector NeoPixel Jewels NeoPixel jewel Product Selector 1/4 60 NeoPixel Ring NeoPixel Ring Product Selector Side Light NeoPixel LED PCB BarIndividual NeoPixels Integrated NeoPixel Products Flora RGB Smart NeoPixels Breadboard-Friendly RGB Smart NeoPixels NeoPixel Mini PCB Discrete NeoPixel Products Through-Hole NeoPixels SMT NeoPixels WS2811 Driver IC Adafruit IndustriesPage 2 of 8438414142454747484949505051525758596060 6164666666676767707071737374747575767878 7878787979 Basic ConnectionsBest Practices Improper use can damage your NeoPixels.
2 Before diving in, be aware of the following:Powering NeoPixels Estimating Power Requirements Giant Power Supplies Distributing Power Driving 5V NeoPixels from MicrocontrollersSoftwareArduino Library Installation Install Adafruit_NeoPixel via Library Manager Manually Install Adafruit_NeoPixel Library A Simple Code Example: strandtestArduino Library Use HSV (Hue-Saturation-Value) ..and Gamma Correction Help! Pixels Gobble RAMNeoMatrix Library Layouts Tiled Matrices Other Layouts RAM Again Gamma CorrectionAdvanced Coding FastLED Library FAQ and Further Programming Insights DMA NeoPixels for ARM Cortex-M0 Boards Third-Party Libraries Writing Your Own LibraryPython & CircuitPython CircuitPython Microcontroller Wiring Python Computer Wiring CircuitPython Installation of NeoPixel Library Python Installation of NeoPixel Library CircuitPython & Python Usage Full Example CodePython DocsMakeCode Guide Link: NeoPixels with MakeCodeDownloads NeoPixel 12-LED Ring NeoPixel 16-LED Ring NeoPixel 24-LED Ring Adafruit IndustriesPage 3 of 84808182838384 NeoPixel 1/4 60-LED Ring NeoPixel jewel Breadboard Friendly NeoPixel Breakout NeoPixel NeoMatrix 8x8 NeoPixel Arduino Shield NeoPixel 8 Stick Adafruit IndustriesPage 4 of 84 The Magic of NeoPixels Incorporating scads of LEDs into an electronic project used to be a hairy prospect, averitable rat s nest of wires and code.
3 The arrival of dedicated LED driver chipsbrought welcome relief, offloading grunt work from the microcontroller and allowingone to focus on the application. Much simpler, but still not Christmas light WS2812 Integrated Light Source or NeoPixel in Adafruit parlance is thelatest advance in the quest for a simple, scalable and affordable full-color LED. Red,green and blue LEDs are integrated alongside a driver chip into a tiny surface-mountpackage controlled through a single wire. They can be used individually, chained intolonger strings or assembled into still more interesting Things to Know About NeoPixels in GeneralNot all addressable LEDs are NeoPixels. NeoPixel is Adafruit s brand forindividually-addressable RGB color pixels and strips based on the WS2812, WS2811 and SK6812 LED/drivers, using a single-wire control protocol. Other LEDproducts we carry DotStars, WS2801 pixels, LPD8806 and analog strips use different methodologies (and have their own tutorials).
4 When seekingtechnical support in the forums, a solution can be found more quickly if thecorrect LED type is mentioned, avoid calling DotStars NeoPixels ..similar,but different! We know you re eager to get If this is your first time using NeoPixels, please at least read the Best Practices page before connecting anything! Adafruit IndustriesPage 5 of 84 NeoPixels don t just light up on their own; they require a microcontroller (suchas Arduino) and some programming. We provide some sample code to get youstarted. To create your own effects and animation, you ll need someprogramming practice. If this is a new experience, work through some of thebeginning Arduino tutorials to get a feel for the aren t the answer for every project. The control signal has very stricttiming requirements, and some development boards (such as Netduino orRaspberry Pi) can t reliably achieve this in every situation. This is why wecontinue to offer other LED types; some are more adaptable to certain I use NeoPixels for POV (persistence of vision)displays?
5 Not recommended. The refresh rate is relatively low (about 400 Hz to 2 KHz), andwhen in fast motion may appear speckled. They look fine in stationary displaysthough (signs, decorations, jewelry, etc.). For POV use, DotStar strips ( ) will look much better (they have a 12 20 KHz refresh rate).How about for light painting?Definitely! The slower movement used for photographic light painting doesn t callattention to the limited refresh rate; the results look great ( ),especially with a light there a limit to the number of NeoPixels in a chain?There s no inherent limit in the maximum length of a NeoPixel chain, but eventuallyyou ll encounter any of various practical limits:RAM: NeoPixels require some RAM from the host microcontroller; more pixels= more RAM. It s only a few bytes each, but as most microcontrollers arepretty resource-constrained, this becomes a very real consideration for : each NeoPixel draws a little bit of current; more pixels = more supplies likewise have some upper : NeoPixels process data from the host microcontroller at a fixed datarate; more pixels = more time and lower animation frame rates.
6 1. 2. 3. Adafruit IndustriesPage 6 of 84 Form Factors NeoPixel products are available in a zillion form individual tiny pixels tohuge strips, rings and everything in-between. The same softwaredrives all of them; they re all NeoPixels. Pick a category from the left column for product links and tips & tricks specific to eachtype of Strips and Strands The most popular type of NeoPixels are these flexible LED can be cut tolength and fit into all manner of things. We ve got over a dozen varieties! Two vitalthings to be aware of:Though strips are described as flexible, they do not tolerate continuous andrepeated bending. Formable might be a better word. A typical applicationis architecture, where they can be curved around columns and then stay flexing (as on costumes) will soon crack the solder connections. Forwearable use, either affix shorter segments to a semi-rigid base ( a hat, BMXarmor, etc.), or use the individual sewable NeoPixels shown your power draw.
7 Though each pixel only needs a little current, it adds strips are so simple to use, one can quickly get carried away!We ll explain more on the Powering NeoPixels page. Adafruit IndustriesPage 7 of 84 RGB NeoPixel Strips NeoPixel Digital RGB LED WeatherproofStrip is available in three different densities : 30, 60 and 144 LEDs permeter, on a white or black backing LEDs per meter, whitestrip ( ) 30 LEDs per meter, blackstrip ( ) 60 LEDs per meter, whitestrip ( ) 60 LEDs per meter, blackstrip ( ) 144 LEDs per meter, whitestrip ( ) 144 LEDs per meter, blackstrip ( )The approximate peak power use (allLEDs on at maximum brightness) permeter is:30 LEDs: 9 Watts (about Amps at5 Volts).60 LEDs: 18 Watts (about Ampsat 5 Volts).144 LEDs : 43 watts ( Amps at 5 Volts).Mixed colors and lower brightnesssettings will use proportionally lesspower. Adafruit IndustriesPage 8 of 84 For those using Circuit PlaygroundExpress ( ) or justneeding a no soldering option (as inmost classrooms), we have a special half-meter, 30-LED NeoPixel strip withalligator clips attached ( ).
8 Easy! Adafruit IndustriesPage 9 of 84 Mini Skinny RGB NeoPixel Strips Mini Skinny NeoPixel strips are about halfthe width of classic NeoPixel re available in two densities andbacking colors:30 LEDs per meter, whitestrip ( )30 LEDs per meter, blackstrip ( )60 LEDs per meter, whitestrip ( )60 LEDs per meter, blackstrip ( )144 LEDs per meter, whitestrip ( )144 LEDs per meter, blackstrip ( )30 and 60 LED/meter strips are mmwide, or 5 mm if you remove the stripfrom the casing (vs mm / 10 mm forclassic strips). The high-density 144/mstrips are about 10 mm wide, or the casing requirements are similar tostandard-width NeoPixel strips asdescribed above. Adafruit IndustriesPage 10 of 84 Side-Light NeoPixel Strips Side-Light NeoPixel strips have theinteresting property of illuminating nextto the strip rather than over it. They renot quite as bright as regular NeoPixels,but may have interesting uses in tightspaces or for edge-lit acrylic.
9 Thesestrips are available in three densities onblack flex-strip:60 LEDs, 1 meter black strip ( ) 90 LEDs, 1 meter black strip ( ) 120 LEDs, 1 meter blackstrip ( ) Adafruit IndustriesPage 11 of 84 RGBW NeoPixel Strips A recent addition is RGBW NeoPixelstrips. These add a fourth LED element pure white which is more true andpleasing to the eye than white mixedfrom red+green+blue. Like the RGBstrips, they re available in different pixeldensities and backing strip RGBW LEDs per meter,white strip ( )30 RGBW LEDs per meter, blackstrip ( )60 RGBW LEDs per meter, whitestrip ( )60 RGBW LEDs per meter, blackstrip ( )144 RGBW LEDs per meter, whitestrip ( )144 RGBW LEDs per meter, blackstrip ( )With a fourth LED per pixel, these stripsmay potentially draw up to 33% morecurrent than their RGB equivalents. Themaximum brightest cases are(approximately):30 RGBW LEDs: 12 Watts ( Ampsat 5 Volts)60 RGBW LEDs: 24 Watts ( Ampsat 5 Volts)144 RGBW LEDs: 57 Watts ( at 5 Volts)Width is the same as classic are not the skinny size.
10 Adafruit IndustriesPage 12 of 84 Neon-Like NeoPixel Flex Strip This distinctive NeoPixel flex strip has agorgeous diffused neon-like appearancethanks to its thick silicone strip contains 60 LED along themeter but in groups of basically, in your NeoPixel program, this looks like a 20-pixel-long the other varieties of NeoPixelstrip, this one needs to be powered from9 Volts (minimum) to 12 Volts (ideal) RGB Neon-like LED FlexStrip with Silicone Tube - 1meter ( ) Adafruit IndustriesPage 13 of 84 Ultraviolet NeoPixel Strips A single-color ultraviolet variant ofNeoPixel strip is available for specialapplications, currently one pixel densityand backing color:32 UV LEDs per meter, whitestrip ( ) This can provide unusual effects whencombined with UV-reactive paints,fluorescent laser-cut acrylic, usual NeoPixel R, G and B channelstranslate to three individual UV we recommend you pretty much justset all three channels to the same value,ranging from (0, 0, 0) to (255, 255, 255).