Datasheet
The above declares two distinct NeoPixel objects, one each on pins 5 and 6, each containing 16
pixels and using the implied default type (NEO_KHZ800 + NEO_GRB).
Can I connect multiple NeoPixel strips to the same Arduino pin?
In many cases, yes. All the strips will then show exactly the same thing. This only works up to a
point though…four strips on a single pin is a good and reliable number. If you need more than
that, individual NeoPixels can be used as buffers to “fan out” to more strips: connect one Arduino
pin to the inputs of four separate NeoPixels, then connect each pixels’ output to the inputs of four
strips (or fewer, if you don’t need quite that many). If the strips are 10 pixels long, declare the
NeoPixel object as having 11 pixels. The extra “buffer” pixels will be at position #0 — just leave
them turned off — and the strips then run from positions 1 through 10.
I'm getting the wrong colors. Red and blue are swapped!
When using through-hole 8mm NeoPixels (or V1 Flora pixels), use NEO_RGB for the third
parameter in the Adafruit_NeoPixel declaration. For all other types of NeoPixels, use NEO_GRB.
The colors fall apart when I use setBrightness() repeatedly!
See note above; setBrightness() is designed as a one-time setup function, not an animation
effect.
Pixels Gobble RAM
Each NeoPixel requires about 3 bytes of RAM. This doesn’t sound like very much, but when you
start using dozens or even hundreds of pixels, and consider that the mainstream Arduino Uno only
has 2 kilobytes of RAM (often much less after other libraries stake their claim), this can be a real
problem!
For using really large numbers of LEDs, you might need to step up to a more potent board like the
Arduino Mega or Due. But if you’re close and need just a little extra space, you can sometimes
tweak your code to be more RAM-efficient. This tutorial has some pointers on memory
usage. (http://adafru.it/coj)
Adafruit_NeoPixel strip_a = Adafruit_NeoPixel(16, 5);
Adafruit_NeoPixel strip_b = Adafruit_NeoPixel(16, 6);
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 21 of 39