Created
March 10, 2018 00:38
-
-
Save parzibyte/efe2355acad34e35a4d5383f6866c6dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void encenderBuzzer() { | |
digitalWrite(BUZZER, HIGH); | |
} | |
void apagarBuzzer() { | |
digitalWrite(BUZZER, LOW); | |
} | |
void marcarDisparoNoAcertadoEn(int x, int y) { | |
escenario[x][y] = DISPARO_NO_ACERTADO; | |
} | |
void marcarDisparoAcertadoEn(int x, int y) { | |
escenario[x][y] = DISPARO_ACERTADO; | |
} | |
void indicarDisparoAcertado() { | |
encenderBuzzer(); | |
delay(DURACION_BUZZER_DISPARO_ACERTADO); | |
apagarBuzzer(); | |
} | |
void indicarDisparoErroneo() { | |
for (int x = 0; x < 5; x++) { | |
encenderBuzzer(); | |
delay((DURACION_BUZZER_DISPARO_NO_ACERTADO / 2) / 5); | |
apagarBuzzer(); | |
delay((DURACION_BUZZER_DISPARO_NO_ACERTADO / 2) / 5); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment