Initial Commit

This commit is contained in:
Lukas Bachschwell 2015-12-03 12:03:49 +01:00
commit 1e507bf334
2 changed files with 50 additions and 0 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
Dieses Repositorty enthält die Software der Jägermeister Lichterkette

49
lichterKette.ino Normal file
View File

@ -0,0 +1,49 @@
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
#define NUMPIXELS 22
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
unsigned long previousMillis = 0;
unsigned long interval = 0;
int mode = 0;
int element = 0;
int colorval1 = 0;
int colorval2 = 0;
int colorval3 = 0;
void setup() {
pixels.begin();
}
void loop() {
interval = 100;
if(element<NUMPIXELS)
element++;
else
element = 0;
for(int i = 0; i < NUMPIXELS; i++){
pixels.setPixelColor(i,pixels.Color(((i==element)?255 :0),((i==element)?0:0),((i==element)?0:255))); // Moderately bright green color.
}
/*
for(int i = 0; i < NUMPIXELS; i++){
if(i%2)pixels.setPixelColor(i,pixels.Color(0,0,255));
else pixels.setPixelColor(i,pixels.Color(255,0,0));
}
*/
pixels.show();
delay(200);
}