Inaktivitätsanzeige hinzugefügt

This commit is contained in:
nimeissn 2022-05-18 19:52:58 +02:00
parent ecab940541
commit ba60af1c3d

View file

@ -157,9 +157,11 @@ void loop()
if (isButtonPressed()) { if (isButtonPressed()) {
gameState = GAME_STATE_INIT; gameState = GAME_STATE_INIT;
} }
else if (millis() - lastDrawUpdate > 10000) else if (millis() - lastDrawUpdate > 300000)
{ {
resetLEDs(); resetLEDs();
pointsPlayerBlue = 0;
pointsPlayerRed = 0;
attentionLight(); attentionLight();
} }
break; break;
@ -479,10 +481,12 @@ void playTone(byte type)
void attentionLight() void attentionLight()
{ {
int n = random(0,200); int n = random(0,200);
int m = random(0,200);
int r = random(0,250); int r = random(0,250);
int g = random(0,250); int g = random(0,250);
int b = random(0,250); int b = random(0,250);
pixels.setPixelColor(n,Color(r,g,b)); pixels.setPixelColor(n,Color(r,g,b));
pixels.setPixelColor(m,r,g,b);
pixels.show(); pixels.show();
delay(1000); delay(1000);
} }