My inputs don''t work!
Archiver
Posts: 46,084
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.
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.