Created
October 6, 2016 13:24
-
-
Save chainlink/0d58b1270ecad20c042d9c93805129b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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