Wiring & Test

Wiring is easy, you can use any pin with a Serial or Software Serial output pin.  We don't use the input of a Serial connection (since the Pixie is 'write only'). Dont forget to power the Pixie with a good 5V supply that can handle the current draw.

Our example code will use digital #6 but you can change this to any pin later

Download Adafruit_Pixie library

To begin reading sensor data, you will need to download Adafruit_Pixie from our github repository. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip

Rename the uncompressed folder Adafruit_Pixie and check that the Adafruit_Pixie folder contains Adafruit_Pixie.cpp and Adafruit_Pixie.h

Place the Adafruit_Pixie library folder your arduinosketchfolder/libraries/ folder.
You may need to create the libraries subfolder if its your first library. Restart the IDE.

We also have a great tutorial on Arduino library installation at:

Load Demo

Open up File->Examples->Adafruit_Pixie->strandtest and upload to your Arduino wired up to the Pixies

That's it! You're ready to rock out to your bright lights

Library Usage

Start by including both SoftwareSerial and the Pixie Library

#include "SoftwareSerial.h"
#include "Adafruit_Pixie.h"

Two #define's will determine which pin you're using for controlling the Pixie's and how many there are

#define NUMPIXELS 3 // Number of Pixies in the strip
#define PIXIEPIN  6 // Pin number for SoftwareSerial output

Pixie's receive data via Serial. You can use hardware serial as well, but our demo is SoftwareSerial. Create a new SoftSerial device that transmits on the pixie pin

SoftwareSerial pixieSerial(-1, PIXIEPIN);

Then pass in the software or hardware serial device to create the Pixie strip

Adafruit_Pixie strip = Adafruit_Pixie(NUMPIXELS, &pixieSerial);

Start the Pixie object by setting the baud rate, it is 115200 so dont change that number

pixieSerial.begin(115200); // Pixie REQUIRES this baud rate

You can set the overall brightness, this is a one time 'nonreversable' setting, so once you set pixel colors they will automatically be scaled by the brightness. 0 is all the way off, 255 is all the way on. Default is 255.

 strip.setBrightness(200); // Adjust as necessary to avoid blinding

Then you can set each pixel color with

strip.setPixelColor(n, red, green, blue);

Where n ranges from 0 to numberOfPixels-1 and red, green and blue are the RGB component color, ranging from 0 (off) to 255

For example, to set pixel #1 to full red:

strip.setPixelColor(0, 255, 0, 0);

To set pixel #5 to a dim green-blue

strip.setPixelColor(4, 0, 30, 30);

Once the pixel colors are set, you'll need to tell the pixie strand to update, call:

Last updated on 2016-06-03 at 05.05.21 PM Published on 2015-10-20 at 05.14.37 PM