#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel strip(16, 2, NEO_GRB + NEO_KHZ800);
void setup() {
// put your setup code here, to run once:
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.show(); // Turn OFF all pixels ASAP
strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
}
void loop() {
// put your main code here, to run repeatedly:
colorWipe(strip.Color(255, 0, 0), 100); // Red
colorWipe(strip.Color( 0, 255, 0), 100); // Green
colorWipe(strip.Color( 0, 0, 255), 100); // Blue
}
void colorWipe(uint32_t color, int wait) {
for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
strip.setPixelColor(i, color); // Set pixel's color (in RAM)
strip.show(); // Update strip to match
delay(wait); // Pause for a moment
}
}