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 the Adafruit Pixie library.

Open up the Arduino library manager:

Search for the Adafruit Pixie library and install it

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:


This guide was first published on Oct 20, 2015. It was last updated on May 21, 2024.

This page (Arduino Wiring & Test) was last updated on Mar 08, 2024.

Text editor powered by tinymce.