Store › Forums › Defusable Clock › General Discussion › Arduino
- This topic has 4 replies, 3 voices, and was last updated 11 years ago by
arham.
-
AuthorPosts
-
December 23, 2011 at 8:32 am #581
laurent
Memberhello 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;
}December 23, 2011 at 1:36 pm #1312Michael
KeymasterLaurent,
The default countdown of 10 seconds is defined here:
#define COUNTDOWN_DURATION 10
You can change that.
The buzzer is driven by a 5V PWM square wave.
December 23, 2011 at 1:48 pm #1313laurent
Memberthank you …mickael…
I finished my 1st version of my “bomb”
I would make another “bomb” soon, even more beautiful..
Merry christmas and good year Mickael
December 23, 2011 at 1:54 pm #1314Michael
KeymasterMerry Christmas and Happy New Year, Laurent. Your project looks wonderful! Great job.
January 27, 2015 at 7:13 am #2155arham
Memberyep, we started calling it the burrito because as we were building it, everyone kept calling it the “bomb” and I didn’t want any extra “attention” called to us (as i am sure you have experienced). I dont have it with me right now, but hopefully later on this week or next I can get a good picture for you.
Thanks again for making this open source!
__________________
http://www.solitairecardgame.info -
AuthorPosts
- You must be logged in to reply to this topic.