diff --git a/PringlesLooper/PringlesLooper.ino b/PringlesLooper/PringlesLooper.ino index aef0b9f..ffef02a 100644 --- a/PringlesLooper/PringlesLooper.ino +++ b/PringlesLooper/PringlesLooper.ino @@ -29,29 +29,34 @@ void tick() { if (time == 24) time = 0; + if (bar == 4) bar = 0; - if ((time == 0) && (bar == 0)) - digitalWrite(13, HIGH); - - if (time == 3) - digitalWrite(13, LOW); + if ((time == 0) && (bar == 0)){ + leds.setPixelColor(0,0,0,255); + leds.setPixelColor(1,0,0,255); + leds.show(); + } + 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++; - + }