Datasheet

Arduino Library
Controlling NeoPixels “from scratchis quite a challenge, so we provide a library letting you focus on
the fun and interesting bits. The library works with most mainstream Arduino boards and derivatives:
Uno, Mega, Leonardo, Micro, Adafruit Flora, etc. — most anything with an Atmel AVR 8-bit
processor from 8 to 16 MHz — and also works with the Arduino Due and all varieties of the PJRC
Teensy boards.
Because processor-specific assembly language is used, this library does not work on Netduino,
ChipKIT or other advancedArduino-like boards. Others may have written code and libraries for
such boards, but we can’t provide technical support for any bugs or trouble there; that’s frontier
stuff. Some of this is covered in the “Advanced Coding” section.
Installation of the library is as follows:
1. Visit the Adafruit_NeoPixel library page (http://adafru.it/aZU) at Github.com.
2. Select the “Download ZIP” button, or simply click this link (http://adafru.it/cDj) to download
directly.
3. Uncompress the ZIP file after it’s finished downloading.
4. The resulting folder should contain the files “Adafruit_NeoPixel.cpp”, “Adafruit_NeoPixel.h
and anexamples” sub-folder. Sometimes in Windows you’ll get an intermediate-level folder
and need to move things around.
5. Rename the folder (containing the .cpp and .h files) to “Adafruit_NeoPixel” (with the
underscore and everything), and place it alongside your other Arduino libraries, typically in
your (home folder)/Documents/Arduino/Libraries folder. Libraries should not be installed
alongside the Arduino application itself.
6. Re-start the Arduino IDE if it’s currently running.
Here’s a tutorial (http://adafru.it/aYM) that walks through the process of correctly installing Arduino
libraries.
Basic Connections
To get started, let’s assume you have some model of Arduino microcontroller connected to the
computer’s USB port. We’ll elaborate on the finer points of powering NeoPixels later, but for now
you should use a separate 5V DC power supply (or a 3.7V lithium-ion battery for a Flora wearable
project).
Identify theinput” end of your NeoPixel strip, pixel(s) or other device. On some, there will be a
solder pad labeled “DIN” or “DI(data input). Others will have an arrow showing the direction that
data moves. The data input can originate from any digital pin on the Arduino, but all the example
code is set up for digital pin 6 by default. The NeoPixel shield comes wired this way.
If using Flora with an attached lithium-ion battery: connect the +5V input on the strip to the
VBATT pad on Flora, GND from the strip to any GND pad on Flora, and DIN to Flora pin D6.
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 15 of 39