hello Mickael
I would like to know if it is very there that I have to modify the 10 seconds by default of the countdown.
The part in red
And I would like to know the tension of functioning of the buzzer? it’s 2v ?
The time is good in milliseconds?? 1 secondes = 1000 ??
thank you..
**********************************************************************************
// Reset back to the last second boundary so we can start the countdown
// immediately and so that the first second isn’t truncated
TCNT1 = TIMER1_SECOND_START;
beep(3800, 30);
digitalWrite(LED_DET, ledCurrentState);
while ((countdownSeconds > 0) && (!defused)) {
for(int i=0;i<10000;i++) { //10000 represent 10 seconds?
// get input
if (digitalRead(defusePin) == HIGH) {
defused = true;
break;
}
if (digitalRead(detPin) == HIGH) {
countdownSeconds = 0;
break;
}
}
delay(20);
if (ledCounter++ > ledCounterThreshold) {
ledCounter = 0;
if (ledCurrentState == HIGH) {
ledCurrentState = LOW;
} else {
ledCurrentState = HIGH;
}
digitalWrite(LED_DET, ledCurrentState);
}
}
digitalWrite(LED_DET, LOW);
countdownRunning = false;
if (!defused) {
detonate();
} else {
beep(4500, 80);
delay(2000);
displayCountdown = false;
}