Store › Forums › Defusable Clock › Bugs/Problems › WIRE_3 always "HIGH"
- This topic has 9 replies, 2 voices, and was last updated 12 years, 3 months ago by
Romain.
-
AuthorPosts
-
July 4, 2013 at 2:46 am #633
Romain
ParticipantHello everyone,
i tried different programming changes from 2 weeks now and I never had any problem.
Now whatever I do, the WIRE_3 is still “HIGH”, even if I write it LOW.
I tested it, it always sends 4.62V, HIGH or LOW…
Even if i try another program I have a HIGH on that pin…
Any idea?
Thx.
Romain.July 4, 2013 at 10:53 am #1726Michael
KeymasterWIRE_3 is an INPUT pin, not an OUTPUT pin. You can’t “write” the value to LOW. The purpose of an input pin is to read its value to see if it is shorted to ground or not. If WIRE_3 is connected to ground (by a wire), then digitalRead(WIRE_3) returns LOW. If not, digitalRead(WIRE_3) returns HIGH.
if you are trying to use WIRE_3 as an output, then you need to set pinMode(WIRE_3, OUTPUT).
July 4, 2013 at 7:02 pm #1727Romain
ParticipantI did this to try changing its state.
I thought there was a problem when my program stopped to work suddenly, and “WIRE_3” was the in cause.
Now, i have uploaded your original sketch and look what it does (without changing the random defuse and detpin):
July 4, 2013 at 8:03 pm #1728Michael
KeymasterAre you saying that the clock worked correctly when you received it?
I think your wires are not connected well. Make sure each terminal on the right side is connected to ground. All four terminals on the left side are at ground. Use a multimeter to ensure that all terminal blocks are at ground when all wires are attached.
July 4, 2013 at 8:40 pm #1729Romain
Participantyes all worked correctly when I received it; both of the 2 kits.
I changed the wires, checked the connections, but it changes nothing….
Here’s what i did :
I changed WIRE1 to 4 as OUTPUT, wrote it LOW and I have this :
July 4, 2013 at 9:02 pm #1730Michael
KeymasterThanks for the videos.
Ok, did you ever change WIRE_3 to OUTPUT and set it HIGH while it was connected to ground? If so, you will destroy the I/O pin on the microcontroller.
I think you may have done that accidentally as you were making code changes.
July 4, 2013 at 9:07 pm #1731Romain
ParticipantWell damn….
It is possible….
I have to change the atmega now 🙂
Thanks Michael !
July 4, 2013 at 9:11 pm #1732Michael
KeymasterBon chance, my friend!
July 4, 2013 at 9:14 pm #1733Romain
ParticipantAhah merci !!
😉
July 14, 2013 at 12:54 am #1734Romain
ParticipantWell, I tried to unsold it but…It’s damn too well solded !!!!! I ruined evrything…
Plan B, i have extracted the atmega ..with my leatherman…Atmega finished in 7 pieces……lol…not good to see…and i must drill new holes now to insert a socket to prevent destroying others 328^^
Re-bon chance myself 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.