Basic Clock working
This commit is contained in:
parent
3fc093a923
commit
0fdca16836
@ -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);
|
||||
|
||||
time++;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user