Remove delay when waiting for button

This commit is contained in:
Gabriel Augendre 2021-04-29 16:33:12 +02:00
parent 1257ca1216
commit 4b6eb4fd5f

View file

@ -82,7 +82,6 @@ byte computeWinner() {
// Wait for a button press // Wait for a button press
playerA = digitalRead(PLAYER_A); playerA = digitalRead(PLAYER_A);
playerB = digitalRead(PLAYER_B); playerB = digitalRead(PLAYER_B);
delay(1);
} }
if (playerA == LOW && playerB == HIGH) { if (playerA == LOW && playerB == HIGH) {
return PLAYER_A; return PLAYER_A;
@ -121,7 +120,6 @@ void waitForReady() {
// Wait for a button press // Wait for a button press
playerA = digitalRead(PLAYER_A); playerA = digitalRead(PLAYER_A);
playerB = digitalRead(PLAYER_B); playerB = digitalRead(PLAYER_B);
delay(1);
} }
if (playerB == LOW) { if (playerB == LOW) {