#12s

The Seahawks play the Packers tomorrow for the NFC championship, so here’s a quick “12th man” project. I took a square of foam core board, cut some slots at the ends and vertices of the digits 1 and 2, and threaded these slots with a 100-light NeoPixel strip.

2015-01-17-23.34.33 2015-01-17-23.34.51

Add a little support hardware and you have one fancy window decoration.

2015-01-17-23.40.11

This connects power from the strip to +5v and ground on the Uno and the data pin on the strip to digital pin 6. The 1000uF cap across the power and 470ohm resistor on the data line are per Adafruit’s recommendations. If I decide to keep it for next season, I’ll probably mount a Pro Mini or a Trinket to the back of the foam board so that all I’ll need to do is connect it to power.

The code is very simple, adapted from the “theaterChase” function in the NeoPixel example sketch.

#include <Adafruit_NeoPixel.h>

#define PIN 6
#define NUM_PIXELS 100
#define DELAY 50

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_PIXELS, PIN, NEO_GRB + NEO_KHZ800);

uint32_t green = strip.Color(0, 255, 0);
uint32_t blue = strip.Color(0, 0, 255);
uint32_t color = green;

void setup() {
  strip.begin();
}

void loop() {
  for (int q=0; q < 3; q++) {
    for (int i=0; i < NUM_PIXELS; i=i+3) {
      if (color == green) {
        color = blue;
      } else {
        color = green;
      }
      strip.setPixelColor(i+q, color);    
    }
    strip.show();
     
    delay(DELAY);
     
    for (int i=0; i < NUM_PIXELS; i=i+3) {
      strip.setPixelColor(i+q, 0);        
    }
  }
}

And here it is in action. Go Hawks!

Leave a comment