Code with Arduino

Install the NeoPixel Arduino library

Installation of the library is as follows:

  1. Visit the Adafruit_NeoPixel library page at
  2. Select the “Download ZIP” button, or simply click this link 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 an “examples” 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 that walks through the process of correctly installing Arduino libraries.

Connect your FLORA and computer with a USB cable.

Now upload!

Install the NeoPixel library and go to File --> Examples --> Adafruit_NeoPixel --> strandtest.

If you cannot find that file in the dropdown menu go back up and reinstall the library.

This will launch a window containing the sample sketch. Upload it to your FLORA or GEMMA with the Upload button.

Once successfully uploaded to your FLORA or GEMMA, the pixel will flash and fade different colors. Congrats, you've tested your pixel!

We do test each pixel in the factory, but you should use this method to test that all three colors (red, green, blue) work on each of your pixels before sewing them into your project!

For GEMMA, you'll need to change the pin number in the Arduino sketch before uploading. Change "6" to "1":

Then upload the sample code to GEMMA by pressing the reset button (the red LED should start pulsing) and clicking the "upload" button in the Arduino software.

This guide was first published on Nov 08, 2012. It was last updated on Nov 08, 2012. This page (Code with Arduino) was last updated on Oct 20, 2019.