Shop OBEX P1 Docs P2 Docs Learn Events
My inputs don''t work! — Parallax Forums

My inputs don''t work!

ArchiverArchiver Posts: 46,084
edited 2003-05-29 03:37 in General Discussion
I am trying to read a mechanical switch attached to pin 2 of my
bs2e. I connected on pin on the switch to ground, and the other
into pin 5(my carrier board has built in pullup resistors). I cannot
get this to work. The pin changes states one time when i check it,
it will be 0 and another time 1. I understand that this is what I
might expect if the pin is floating, but the pin is not floating. I
am trying to read the pin with the following code: "if in2=0 then
program1". If anyone has any suggestions PLEASE let me know.
Sign In or Register to comment.