An Arduino library and Pinoccio sketch to animate NeoPixel strands
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/PinoccioPixels Adding new fadeout animation May 10, 2014
LICENSE.txt Adding license May 9, 2014
NeoPixelStripAnimator.cpp Adding new fadeout animation May 10, 2014
NeoPixelStripAnimator.h Adding new fadeout animation May 10, 2014 Added note on driving NeoPixels from Pinoccio May 10, 2014

NeoPixel Strip Animator

This is an Arduino library and a Pinoccio sketch that makes animating NeoPixel strands in a non-blocking way as easy as possible. The main motivation for this is that to take full advantage of platforms like the Pinoccio, we need to let the main loop run freely (no blocking delays), so that the board can take care of other things like network and serial communications.



Copy the contents of this repo into: (YOUR_ARDUINO_DOCS)/libraries/NeoPixelStripAnimator/

Pinoccio ScoutScript integration

The included Pinoccio sketch adds the following ScoutScript commands (pull requests for more pixel animations welcome!)


For a quick video demo see:

On the video, I'm using 6 Flora RGB NeoPixels sewed into a (super awesome, Internet-aware) necktie.

Driving 5V NeoPixels with Pinoccio

The Pinoccio LiPo battery provides 3.7v to power external devices. This is ok for the Pinoccio and a short length of NeoPixels (I've tried up to 6 Flora pixels with no problems), but to drive longer NeoPixel strands, see the notes on Adafruit's NeoPixel page

Using the library

The following is a simple Arduino sketch that will use the library cycle between the "NightRider" animation and clearing the strip for each byte received on the serial port.

#include <Adafruit_NeoPixel.h>
#include <NeoPixelStripAnimator.h>

#define PIN 6

// Declare and configure the NeoPixel strand
Adafruit_NeoPixel strip = Adafruit_NeoPixel(6, PIN, NEO_GRB + NEO_KHZ800);
// Declare and configure the animator
NeoPixelStripAnimator neoPixelStripAnimator(&strip);

int state = 0;
void setup() {

void loop() {
    if (Serial.available() > 0) {;
        state = (state + 1) % 2;
            neoPixelStripAnimator.startAnimation(new NightRiderAnimation(Adafruit_NeoPixel::Color(255,0,0), 70));


Hector Urtubia,


NeoPixelStripAnimator is available under the MIT license. See the LICENSE file for more info.