Store › Forums › Defusable Clock › General Discussion › couple questions: usb cable and programming the clock
- This topic has 8 replies, 4 voices, and was last updated 12 years, 1 month ago by Michael.
-
AuthorPosts
-
January 27, 2012 at 8:08 am #465exibarMember
Great item! I’m going to purchase one for sure for a boy scout event coming up with a Military spy theme…
couple questions:
the USB programming cable, is that just a regular USB cable? I have tons of them laying around in a box, and I could easily wire one up… or I may even have one that would plug into a motherboard usb header… What would the pinouts be? Is there a pinout diagram for the cable?
2nd question:
I’d like the disarm wire always to be the same wire, can that be easily programmed instead of having it randomized?
thanks!
Mike BJanuary 27, 2012 at 4:25 pm #922MichaelKeymasterNo, it’s not a normal USB cable. It’s a USB to Serial converter and there’s actually a chip embedded in the cable. That’s why it’s expensive. I’m all out of these at the moment but more are arriving in the next few days.
If you want the same wire to be used for disarm instead of random, that’s a very simple change in the code. Change this:
// assign random pins
defusePin = random(WIRE_1, (WIRE_4+1));
detPin = defusePin;
while (detPin == defusePin) {
detPin = random(WIRE_1, (WIRE_4+1));
}
to this:
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));
}
January 27, 2012 at 7:16 pm #925exibarMembercool…. ok so I’ll have to do something about the serial to usb converter…
cool about the code, I looked it over after sending the message and everything is really easy to follow and modify, I really really like it! 😉
January 27, 2012 at 7:23 pm #926exibarMemberIf I get the little adapter board, what voltage should it be set to? 5v or 3.3v? I see the adapter board comes preset at 5v.
January 27, 2012 at 7:33 pm #927MichaelKeymaster5V. I typically use a 5V USB to serial FTDI adapter to program boards.
May 28, 2012 at 3:38 pm #1116el tecnicoMemberHi, I’m new to this forum, would need a code for 4-wire never change that is 2 not 1 that triggers accentuated nothing you stop and other
a greeting mario
May 28, 2012 at 4:05 pm #1117el tecnicoMemberhola soy nuevo en este foro, quisiera 2 códigos 1 para que los 4 cables siempre sean los mismos y otro código para que el cable de detonación siempre sea el mismo y los demás a boleo
un, saludo
November 21, 2012 at 9:29 pm #1503KeatahParticipantI wonder if the wires’ functions can be programmed through a button combination or something. For those of us not familiar with whatever language this is written in.
I looked at the code above, would that be a simple cut & paste replacement?
And are there any beginner’s resources on the net I can use to get a handle on how this code works? While I’m sure there’s tons of stuff, but what about simple tutorials?
Eventually I’ll pick this stuff up, I’m sure.
November 23, 2012 at 12:55 am #1506MichaelKeymasterThe language is C. This device is a specialized Arduino board. You program it using the Arduino IDE, and using the Arduino libraries that make C coding easy. There are many, many web sites with information about Arduino programming. Start at the official Arduino site http://arduino.cc
-
AuthorPosts
- You must be logged in to reply to this topic.