Store › Forums › Defusable Clock › General Discussion › Using the "Hack Me" port to gain two digital outputs
- This topic has 6 replies, 3 voices, and was last updated 10 years, 10 months ago by superman7.
-
AuthorPosts
-
September 19, 2013 at 12:35 pm #661collsoftMember
First I would like to congratulate you on an absolutely brilliant product – I have built 4 of these and used them in Airsoft games – everybody loves them!!!!!
Now, On one of my builds I sacrificed one of the wires and used it as an output to drive an external mosfet circuit so that I could trigger a car alarm (louder than the buzzer on the board)
I have been looking at your schematics and I see that the “Hack Me” port is wired to digital pins 0 & 1 on the arduino – so I am guessing that I could use these for additional outputs or inputs with just a little bit of extra programming.
If I were to use these pins for my own projects would I loose the ability to re-program the controller through the Hack Me port?
Have to admit that I forgot to buy the USB cable with my last order so for re-programming I have been removing the ATmel chip and stickjing it in an Arduino Uno for programming !!!!!!
Thanks,
Jason
September 19, 2013 at 2:20 pm #1805MichaelKeymasterYes, you may use pins 0 and 1 (TX and RX) for your project and you will still be able to upload a new sketch on the 6-pin header. You simply won’t be able to do serial communication (using the Arduino Serial library), but you probably aren’t doing that anyway. When you program an Arduino from the IDE, it resets the microcontroller just before uploading the new sketch. So your sketch that uses pins 0 and 1 will not interfere with the ability to load new code onto the chip.
I’m glad to hear that these are working well for your Airsoft games!
September 19, 2013 at 2:38 pm #1806collsoftMemberExcellent – I shall get cracking on it so!!!!
Can I ask a cheeky question then?
I assume that it is somehow possible to reset the microtroller using pins 0 & 1 – do you know how this is done?
Thanks
September 19, 2013 at 2:57 pm #1807MichaelKeymasterYou reset the microcontroller by pulling the DTR pin low to ground. This is the rightmost pin on the 6-pin FTDI header. It is a green wire on the FTDI cable and is marked “GRN” on the board.
This is what the reset button on an Arduino does. It shorts the ATMega328 reset pin to ground when you press it, and that causes the ATMega to reset.
September 19, 2013 at 3:15 pm #1808collsoftMemberThanks Michael – I see it now in your schematic!!!!!!
Sorry for the silly question
September 20, 2013 at 12:19 am #1809MichaelKeymasternot a silly question at all — a very fine question, actually. Have fun!
January 6, 2014 at 6:36 pm #1846superman7MemberThis is what the reset button on an Arduino does. It shorts the ATMega328 reset pin to ground when you press it, and that causes the ATMega to reset.
___________________
http://www.selftestengine.com/642-999.html
http://www.microsoft.com/
http://www.princeton.edu/main/
http://en.wikipedia.org/wiki/University_of_Arkansas_Community_College_at_Morrilton
https://www.facebook.com/ATSDIESEL -
AuthorPosts
- You must be logged in to reply to this topic.