Created
July 8, 2015 14:44
-
-
Save sticilface/abdbf7204af7eac934e4 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 <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