Datasheet
Can NeoPixels be powered directly from the Arduino’s 5V pin?
Sometimes. The Arduino can continuously supply only about 500 milliamps to the 5V pin. Each
NeoPixel can draw up to 60 milliamps at full brightness. So yes, you can skip the separate DC
supply and power directly off the Arduino as long as just a few pixels are used, or more if the
colors and overall brightness are low. When in doubt, give the pixels a separate power supply.
A Simple Code Example: strandtest
Launch the Arduino IDE. From the File menu, select
Sketchbook®® Libraries®® Adafruit_NeoPixel®® strandtest
(If the Adafruit_NeoPixel rollover menu is not present, the library has not been correctly installed, or
the IDE needs to be restarted after installation. Check the installation steps above to confirm it’s
properly named and located.)
Select your board type and serial port from the Tools menu, and try uploading to the board. If the
NeoPixels are connected and powered, you should see a little light show.
Nothing happens!
Check your connections. The most common mistake is connecting to the output end of a strip
rather than the input.
Let’s look at the code now…
All NeoPixel sketches begin by including the header file:
The block of code that follows is mostly descriptive comments. Only the last line is really doing any
work:
We also recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and –
terminals. This prevents the initial onrush of current from damaging the pixels. See the photo
on the next page for an example.
#include <Adafruit_NeoPixel.h>
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 17 of 39