Skip to content

Instantly share code, notes, and snippets.

@chainlink
Created October 6, 2016 13:24
Show Gist options
  • Save chainlink/0d58b1270ecad20c042d9c93805129b2 to your computer and use it in GitHub Desktop.
Save chainlink/0d58b1270ecad20c042d9c93805129b2 to your computer and use it in GitHub Desktop.
#include <Adafruit_NeoPixel.h>
#define PIN 6
#define N_LEDS 144
Adafruit_NeoPixel strip = Adafruit_NeoPixel(N_LEDS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
}
void loop() {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i,strip.Color(255, 255, 255));
}
strip.show();
}
static void chase(uint32_t c) {
for(uint16_t i=0; i<strip.numPixels()+4; i++) {
strip.setPixelColor(i , c); // Draw new pixel
strip.setPixelColor(i-4, 0); // Erase pixel a few steps back
strip.show();
delay(25);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment