From ba60af1c3d50b522d8ba89eb8f9b1938850dea86 Mon Sep 17 00:00:00 2001 From: nimeissn Date: Wed, 18 May 2022 19:52:58 +0200 Subject: [PATCH] =?UTF-8?q?Inaktivit=C3=A4tsanzeige=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VSCode/Pong/src/main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/VSCode/Pong/src/main.cpp b/VSCode/Pong/src/main.cpp index 32b9945..91b8f41 100755 --- a/VSCode/Pong/src/main.cpp +++ b/VSCode/Pong/src/main.cpp @@ -157,10 +157,12 @@ void loop() if (isButtonPressed()) { gameState = GAME_STATE_INIT; } - else if (millis() - lastDrawUpdate > 10000) + else if (millis() - lastDrawUpdate > 300000) { - resetLEDs(); - attentionLight(); + resetLEDs(); + pointsPlayerBlue = 0; + pointsPlayerRed = 0; + attentionLight(); } break; } @@ -479,10 +481,12 @@ 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); pixels.show(); delay(1000); }