Adafruit NeoPixel Überguide
Created by Phillip Burgess
Last updated on 2018-10-25 07:32:13 PM UTC
Guide Contents
Guide Contents
The Magic of NeoPixels
Important Things to Know About NeoPixels in General
Can I use NeoPixels for POV (persistence of vision) displays?
How about for light painting?
Is there a limit to the number of NeoPixels in a chain?
2
5
5
5
6
6
Form Factors
NeoPixel Strips
RGB NeoPixel Strips
Mini Skinny RGB NeoPixel Strips
RGBW NeoPixel Strips
Ultraviolet NeoPixel Strips
Finer Details About NeoPixel Strips
NeoPixel Rings
NeoPixel Ring Product Selector (http://adafru.it/3042)
Finer Details About NeoPixel Rings
7
8
8
10
10
11
12
13
13
15
NeoPixel Matrices
Rigid 8x8 NeoPixel Matrices
NeoPixel Matrix Product Selector (http://adafru.it/3052)
17
17
17
Flexible NeoPixel Matrices
Finer Details About NeoPixel Matrices
We also have a few special-purpose matrices on the NeoPixel Shields page!
17
19
19
NeoPixel Shields
NeoPixel Shield for Arduino
NeoPixel Shield Product Selector (https://adafru.it/lCw)
20
20
20
NeoPixel FeatherWing
Pimoroni Unicorn Hat
Particle/Spark NeoPixel Ring Kit
Other NeoPixel Shapes
NeoPixel Stick
NeoPixel Stick Product Selector (http://adafru.it/3039)
21
21
22
23
23
23
NeoPixel Jewels
NeoPixel Jewel Product Selector (http://adafru.it/3047)
23
24
1/4 60 NeoPixel Ring
NeoPixel Ring Product Selector (http://adafru.it/3042)
24
25
Individual NeoPixels
Integrated NeoPixel Products
Flora RGB Smart NeoPixels
Breadboard-Friendly RGB Smart NeoPixels
NeoPixel Mini PCB
26
26
26
26
27
Discrete NeoPixel Products
Through-Hole NeoPixels
SMT NeoPixels
© Adafruit Industries
https://learn.adafruit.com/adafruit-neopixel-uberguide
28
29
29
Page 2 of 69
WS2811 Driver IC
31
Basic Connections
Can NeoPixels be powered directly from the Arduino’s 5V pin?
32
33
Best Practices
Improper use can damage your NeoPixels. Before diving in, be aware of the following:
34
34
Powering NeoPixels
Estimating Power Requirements
35
37
I estimate I need a 3.6 Amp power supply. I have a 10 Amp supply on-hand. Will this cause my NeoPixels to
explode?
37
What about batteries and “Amp hours”?
37
I need to power LOTS of NeoPixels and don’t have a power supply that large. Can I use several smaller ones?38
Giant Power Supplies
Distributing Power
Driving 5V NeoPixels from 3.3V Microcontrollers
Software
Arduino Library Installation
Install Adafruit_NeoPixel via Library Manager
Manually Install Adafruit_NeoPixel Library
A Simple Code Example: strandtest
Nothing happens!
Something happens but the LEDs are blinking in a weird way!
I don't have RGBW LEDs and the LEDs are still blinking weird!
38
38
39
40
41
41
41
42
42
42
42
Arduino Library Use
I’m calling setPixel() but nothing’s happening!
Can I have multiple NeoPixel objects on different pins?
Can I connect multiple NeoPixel strips to the same Arduino pin?
I'm getting the wrong colors. Red and blue are swapped!
The colors fall apart when I use setBrightness() repeatedly!
43
45
45
46
46
46
Pixels Gobble RAM
NeoMatrix Library
Layouts
Why not just use the rotation feature in Adafruit_GFX?
46
47
47
50
Tiled Matrices
Other Layouts
RAM Again
Gamma Correction
Advanced Coding
FastLED Library
FAQ and Further Programming Insights
Help! My Arduino servo code stops working when combined with NeoPixels!
When driving NeoPixels I cannot receive infrared codes on my IR receiver!
How fast can I refresh a string of (N) pixels?
That won’t do. Now what?
Can I control NeoPixels using (Board X)?
Why not Raspberry Pi?
50
51
51
51
53
53
53
53
53
53
54
54
54
DMA NeoPixels for ARM Cortex-M0 Boards
© Adafruit Industries
https://learn.adafruit.com/adafruit-neopixel-uberguide
54
Page 3 of 69
Third-Party Libraries
WS2811? WS2812? Why do I see two different names mentioned?
55
55
Writing Your Own Library
My Microcontroller Isn’t Fast Enough to Do That
55
56
Python & CircuitPython
CircuitPython Microcontroller Wiring
Python Computer Wiring
CircuitPython Installation of NeoPixel Library
Python Installation of NeoPixel Library
CircuitPython & Python Usage
Full Example Code
Python Docs
Downloads
NeoPixel 12-LED Ring
NeoPixel 16-LED Ring
NeoPixel 24-LED Ring
NeoPixel 1/4 60-LED Ring
NeoPixel Jewel
Breadboard Friendly NeoPixel Breakout
NeoPixel NeoMatrix 8x8
NeoPixel Arduino Shield
NeoPixel 8 Stick
57
57
57
58
58
59
60
62
63
63
63
64
65
65
66
67
68
69
© Adafruit Industries
https://learn.adafruit.com/adafruit-neopixel-uberguide
Page 4 of 69
The Magic of NeoPixels
Incorporating scads of LEDs into an electronic project used to be a hairy prospect, a veritable rat’s nest of wires and
code. The arrival of dedicated LED driver chips brought welcome relief, offloading grunt work from the microcontroller
and allowing one to focus on the application. Much simpler, but still not “Christmas light” simple.
The WS2812 Integrated Light Source — or
NeoPixel
in Adafruit parlance — is the latest 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-mount package controlled through a single wire. They can be used individually, chained into longer strings
or assembled into still more interesting form-factors.
We know you’re eager to get started…but If this is your first time using NeoPixels, please at least read the
“Best Practices” page before connecting anything!
Important Things to Know About NeoPixels in General
Not all addressable LEDs are NeoPixels. “NeoPixel” is Adafruit’s brand for individually-addressable RGB color
pixels and strips based on the WS2812, WS2811 and SK6812 LED/drivers, using a single-wire control protocol.
Other LED products we carry — DotStars, WS2801 pixels, LPD8806 and “analog” strips — use different
methodologies (and have their own tutorials).
When seeking technical support in the forums, a solution can be
found more quickly if the correct LED type is mentioned, i.e. avoid calling DotStars “NeoPixels”…similar, but
different!
NeoPixels don’t just light up on their own; they require a microcontroller (such as Arduino) and some
programming. We provide some sample code to get you started. To create your own effects and animation, you’ll
need some programming practice. If this is a new experience, work through some of the beginning Arduino
tutorials to get a feel for the language.
NeoPixels aren’t the answer for every project. The control signal has very strict timing requirements, and some
development boards (such as Netduino or Raspberry Pi) can’t reliably achieve this. This is why we continue to
offer other LED types; some are more adaptable to certain situations.
Can I use NeoPixels for POV (persistence of vision) displays?
© Adafruit Industries
https://learn.adafruit.com/adafruit-neopixel-uberguide
Page 5 of 69