Store › Forums › Defusable Clock › General Discussion › Programation Defusable Clock V2
- This topic has 5 replies, 3 voices, and was last updated 9 years, 4 months ago by Sander.
-
AuthorPosts
-
February 20, 2015 at 5:06 pm #753Kogoro MouriMember
Hello,
I have buy the defusable clock, first thing, it’s just great, will used for my friend webserie, on airsoft, and many other thing 🙂
I have buy the USB connection for programing the clock.
I have tranfered the downloaded firmware into the clock, but after this, i am unable to set the countdown by pressing the red button (I can go backward but cannot go upward. Ie: 40:00 -> 20:00 OK / 20:00 -> 40:00 by clicking hour or minuts make nothing) I dont know what changed but now minuts and seconds UP isnt working.
I have also tried to modify the Alarme-Countdown function, When i set alarm countdown mode, when the our is set, hen reach the our, its beep 2-3 seconds and after it start countdown, i will set the “Beeping time” before starting more long time beeping.
I have tried modify this:
if (alarmMode == ALARM_DET) {
for(int i=0;i<4;i++) {
beep(3900, 250, false);
delay(250);
But its modify the sound with time (make slow and long beep and not default fast beep for many seconds)
It is possible to make help for this?I will also set the Detonate Wire (WIRE_4) (i have located where set this modification but i dont wkow what i need to input as “Random”)
// assign random pins
defusePin = random(WIRE_1, (WIRE_4+1));
detPin = defusePin;
while (detPin == defusePin) {
detPin = random(WIRE_1, (WIRE_4+1));
}I will also make accelerate/ stop-start coundown when cut certain wires.
I will also for project to make the bomb starting countdown with a mobile phone (by connection rumble wire to powering a small switch, that wil connect + and – of the red button. i think if this is working, by sending an sms that will make the Clock starting countown ^^
Ah, in fact, is it possible to make starting the countdown with the programing port by sending signal or other things?
I also
PS: Sorry for my language, i speak french.
Cordially.
April 1, 2015 at 4:46 pm #2236Kogoro MouriMemberHello, Some news, the problems with configuration of the countdown time is resolved by the new Firmware ,
I have also found for make more long the “Beeps” of alarm stargting countdown and alarm for detonation:
(normaly, the line is: “for(int i=0;i<8;i++) {" I have chanto 8 to 60 for the detonation alarm)
void detonate() {
for(int i=0;i<60;i++) {
digitalWrite(LED_DET, HIGH);
beep(5000, 50, false);
delay(25);
digitalWrite(LED_DET, LOW);
delay(25);
}This is for the Programable timer countdown starting:
(I have change to 16 and 250 to 150 )
}
if (alarmMode == ALARM_DET) {
for(int i=0;i<16;i++) {
beep(3900, 150, false);
delay(250);I have also found on the forum how to set the detonate wire :
detPin = WIRE_1; // or whatever you choose
defusePin = detPin;
// now find a random value for defusePin that is not detPin.
while (defusePin == detPin) {
defusePin = random(WIRE_1, (WIRE_4+1));
}Now i serach how to make (for Ex: wire 3 acellerate the timer, and Wire 4 stop the timer for 1-2 seconds and after restart the countdown) every one can help for programming this?
August 13, 2015 at 11:00 pm #2321ericmelvin10MemberI’ve re-programmed to defuse it cutting the wires in sequence.
August 16, 2015 at 7:13 am #2324SanderParticipantHey ericmelvin,
I would like to try the sequence cutting also.
Could you post the code for that? That would be awesome.
Regards
SanderAugust 21, 2015 at 11:12 pm #2335ericmelvin10MemberIn the function countdown:
I set the pins to wires (one for automatic detonation[Wire_1] and 3 for defusing sequence[Wire_2–>Wire_4–>Wire_3])
defusePin = WIRE_2;
defusePin2 = WIRE_4;
defusePin3 = WIRE_3;
detPin = WIRE_1;
DetState = 0;Then in the main loop of the function:
while ((countdownSeconds > 0) && (!defused)) {
for(int i=0;i<10000;i++) {
if (digitalRead(detPin) == HIGH) {
countdownSeconds = 0;
break;
}
// old stuff commented ;-)
/*if (digitalRead(defusePin) == HIGH) {
defused = true;
break;
}*/
//enters the sequence:
if ((digitalRead(defusePin) == HIGH) && (DetState == 0))
{
DetState++;
beep(4200, 30); //just a noise for comfirmation :)
}
if ((digitalRead(defusePin2) == HIGH) && (DetState < 1))
{
countdownSeconds = 0;
}
else if ((digitalRead(defusePin2) == HIGH) && (DetState == 1))
{
DetState++;
beep(4200, 30);
}
if ((digitalRead(defusePin3) == HIGH) && (DetState < 2))
{
countdownSeconds = 0;
}
else if ((digitalRead(defusePin3) == HIGH) && (DetState == 2))
{
defused = true;
}
}As you can see, it’s pretty simple , but works like a charm 🙂
August 22, 2015 at 2:40 pm #2336SanderParticipantAwesome man!!! Thnx very much.
Im gonna try it. -
AuthorPosts
- You must be logged in to reply to this topic.