Created
October 30, 2013 16:41
-
-
Save jacobjoaquin/7235898 to your computer and use it in GitHub Desktop.
For "Eyes that Follow" Instructable. Lights up 10 NeoPixels the color red with an Adafruit Gemma.
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 NUM_LEDS 10 | |
#define PIN 0 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800); | |
void setup() { | |
strip.begin(); | |
setAll(strip.Color(255, 0, 0)); | |
strip.show(); | |
} | |
void loop() { | |
} | |
void setAll(uint32_t theColor) { | |
for(uint16_t i = 0; i < strip.numPixels(); i++) { | |
strip.setPixelColor(i, theColor); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment