Basic Clock working

This commit is contained in:
Lukas Bachschwell 2016-07-15 14:44:33 +02:00
parent 3fc093a923
commit 0fdca16836

View File

@ -30,26 +30,31 @@ void tick()
if (time == 24)
time = 0;
if (bar == 4)
bar = 0;
if ((time == 0) && (bar == 0))
digitalWrite(13, HIGH);
if ((time == 0) && (bar == 0)){
leds.setPixelColor(0,0,0,255);
leds.setPixelColor(1,0,0,255);
leds.show();
}
if (time == 3)
digitalWrite(13, LOW);
if (time == 3){
leds.setPixelColor(0,0,0,0);
leds.setPixelColor(1,0,0,0);
leds.show();
}
if ((time == 0) && (bar != 0)){
leds.setPixelColor(0,0,255,0);
leds.setPixelColor(1,0,255,0);
leds.show();
}
if (time == 0)
bar++;
if ((time == 0) && (bar != 0))
digitalWrite(12, HIGH);
if (time == 3)
digitalWrite(12, LOW);
bar++;
time++;