diff --git a/VSCode/Pong/src/main.cpp b/VSCode/Pong/src/main.cpp index 91b8f41..f9eae22 100755 --- a/VSCode/Pong/src/main.cpp +++ b/VSCode/Pong/src/main.cpp @@ -157,7 +157,7 @@ void loop() if (isButtonPressed()) { gameState = GAME_STATE_INIT; } - else if (millis() - lastDrawUpdate > 300000) + else if (millis() - lastDrawUpdate > 30000) { resetLEDs(); pointsPlayerBlue = 0; @@ -480,13 +480,58 @@ void playTone(byte type) void attentionLight() { - int n = random(0,200); - int m = random(0,200); - int r = random(0,250); - int g = random(0,250); - int b = random(0,250); - pixels.setPixelColor(n,Color(r,g,b)); - pixels.setPixelColor(m,r,g,b); + int play [44] = {18,17,16,15,14,13,26,33,34,35,24,53,54,55,56,57,58,61,78,81,102,103,104,105,106,101,113,126,133,134,135,136,137,138,124,115,178,177,176,175,165,153,185,193}; + int with [46] = {13,14,15,16,17,18,22,36,42,58,57,56,55,54,53,73,74,75,76,77,78,93,106,114,126,133,115,116,117,118,113,154,155,156,157,158,153,163,176,183,193,195,196,197,198,194}; + int me [30] = {53,54,55,56,57,58,65,75,85,93,94,95,96,97,98,113,114,115,116,117,118,126,138,146,121,133,144,124,135,141}; + + + + for (int i = 0; i< 200; i++) + { + pixels.setPixelColor(i,Color(0,5,5)); + } + pixels.show(); delay(1000); + + for (int i = 0; i<44; i++) + { + pixels.setPixelColor(play[i],Color(255,0,0)); + } + + pixels.show(); + delay(1500); + + for (int i = 0; i< 200; i++) + { + pixels.setPixelColor(i,Color(5,5,5)); + } + + + for (int i = 0; i<46; i++) + { + pixels.setPixelColor(with[i],Color(255,0,0)); + } + + pixels.show(); + delay(1500); + + + for (int i = 0; i< 200; i++) + { + pixels.setPixelColor(i,Color(5,5,5)); + } + + + for (int i = 0; i<30; i++) + { + pixels.setPixelColor(me[i],Color(255,0,0)); + } + + pixels.show(); + delay(1500); + + lastDrawUpdate = millis(); + resetLEDs(); } +