Added some comments
This commit is contained in:
parent
1e507bf334
commit
9d6ebfba95
@ -3,10 +3,14 @@
|
||||
#include <avr/power.h>
|
||||
#endif
|
||||
|
||||
//Important: Set the number of LEDs here!!!
|
||||
#define PIN 6
|
||||
#define NUMPIXELS 22
|
||||
|
||||
//Create the object representation of our strip
|
||||
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
|
||||
|
||||
//Some usefull variables and buffers, currently not all in use
|
||||
unsigned long previousMillis = 0;
|
||||
unsigned long interval = 0;
|
||||
int mode = 0;
|
||||
@ -27,14 +31,13 @@ void setup() {
|
||||
void loop() {
|
||||
|
||||
|
||||
interval = 100;
|
||||
if(element<NUMPIXELS)
|
||||
element++;
|
||||
else
|
||||
element = 0;
|
||||
|
||||
for(int i = 0; i < NUMPIXELS; i++){
|
||||
|
||||
//Set the color values for all leds as pixels.Color(G,R,B);
|
||||
pixels.setPixelColor(i,pixels.Color(((i==element)?255 :0),((i==element)?0:0),((i==element)?0:255))); // Moderately bright green color.
|
||||
}
|
||||
|
||||
@ -44,6 +47,7 @@ void loop() {
|
||||
else pixels.setPixelColor(i,pixels.Color(255,0,0));
|
||||
}
|
||||
*/
|
||||
//this sends the data from our object to the actuall strip
|
||||
pixels.show();
|
||||
delay(200);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user