Making the payoff more exciting
per feedback from kiddo
This commit is contained in:
parent
7e43885af4
commit
b8a4054e6f
@ -7,8 +7,11 @@ const unsigned int LED_BIT2 = 12;
|
||||
const unsigned int START_BUTTON_PIN = 5;
|
||||
const unsigned int GUESS_BUTTON_PIN = 7;
|
||||
const unsigned int BAUD_RATE = 9600;
|
||||
|
||||
const unsigned int DEBOUNCE_DELAY = 20;
|
||||
const unsigned int HOORAY_FLASHES = 10;
|
||||
const unsigned int HOORAY_FLASH_BATCHES = 3;
|
||||
const unsigned int HOORAY_FLASH_BATCH_PAUSE = 200;
|
||||
const unsigned int HOORAY_FLASH_DURATION = 50;
|
||||
Bounce startButton = Bounce();
|
||||
Bounce guessButton = Bounce();
|
||||
int guess = 0;
|
||||
@ -20,11 +23,14 @@ void outputResult(const long result) {
|
||||
}
|
||||
|
||||
void hooray() {
|
||||
for (unsigned int i = 0; i < 3; i++) {
|
||||
outputResult(7);
|
||||
delay(500);
|
||||
outputResult(0);
|
||||
delay(500);
|
||||
for (unsigned int i = 0; i < HOORAY_FLASH_BATCHES; i++) {
|
||||
for (unsigned int i = 0; i < HOORAY_FLASHES; i++) {
|
||||
outputResult(7);
|
||||
delay(HOORAY_FLASH_DURATION);
|
||||
outputResult(0);
|
||||
delay(HOORAY_FLASH_DURATION);
|
||||
}
|
||||
delay(HOORAY_FLASH_BATCH_PAUSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user