Button Craziness
mikeweezer
Posts: 27
Hello everyone,
So I have decided to make another BS2 Project. I went to the toy store and bought a toy to get all of the touch sensors out of them. I looked at them, and they are a VERY basic button. Much like a keyboard button, they are just two metallic plates, you press the button, they connect. Simple enough, right? So I hook into the stamp. One end goes in P1, the other goes to a 10k resistor that then goes to VDD... From here it has gone haywire... When I debug P1, it is going back and forth between 1 and 0's... It seems to be effected whenever I get within 2 feet of it. If i back away, it seems to calm down...
Am I crazy, or should this work? Please Help!
Thanks
mike
So I have decided to make another BS2 Project. I went to the toy store and bought a toy to get all of the touch sensors out of them. I looked at them, and they are a VERY basic button. Much like a keyboard button, they are just two metallic plates, you press the button, they connect. Simple enough, right? So I hook into the stamp. One end goes in P1, the other goes to a 10k resistor that then goes to VDD... From here it has gone haywire... When I debug P1, it is going back and forth between 1 and 0's... It seems to be effected whenever I get within 2 feet of it. If i back away, it seems to calm down...
Am I crazy, or should this work? Please Help!
Thanks
mike
Comments
Without the button pressed there is nothing pulling P1 to a logic 1 or a logic 0.
Connect the 10k resistor from P1 to +5 volts.
Connect also to P1 one of the metalic plates.
Connect the other metalic plate to ground.
When the button is not pressed debug should yeild a 1.
Button pressed debug should yield a 0.
So your program should look for a logic 0 to indicate the button is pressed.
Post Edited (KenM) : 4/22/2005 5:31:38 AM GMT
Works great.
- mike