Remove delay when waiting for button
This commit is contained in:
parent
1257ca1216
commit
4b6eb4fd5f
1 changed files with 0 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue