Skip to content

Instantly share code, notes, and snippets.

@sticilface
Created July 8, 2015 14:44
Show Gist options
  • Save sticilface/abdbf7204af7eac934e4 to your computer and use it in GitHub Desktop.
Save sticilface/abdbf7204af7eac934e4 to your computer and use it in GitHub Desktop.
#include <NeoPixelBus.h> // NeoPixelAnimator branch
#define pixelCount 7 // Strip has 30 NeoPixels
#define pixelPin 2 // Strip is attached to GPIO2 on ESP-01
NeoPixelBus strip = NeoPixelBus(pixelCount, pixelPin);
void setup() {
strip.Begin();
strip.Show();
for (int i = 0; i < 5; i++) {
strip.ClearTo(RgbColor(0,0,0));
strip.Show();
delay(500);
strip.ClearTo(RgbColor(0,0,255));
strip.Show();
delay(500);
}
}
void loop() {
strip.ClearTo(RgbColor(0,0,0));
strip.Show();
delay(500);
strip.ClearTo(RgbColor(0,255,0));
strip.Show();
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment