I set D0 as an INPUT and it always reads HIGH. D0 is being used to read a switch that is normally LOW. After scouring the forum and other places here's what I've found/done:
- made surethat there is a 10K pull down to GND on the D0 line
- made sure that the Serial library is not invoked (D0 is shared as RX)
- included code immediately prior to reading D0 to set the pinMode
- made sure that the internal pull up is not enabled
- tested D0 as an output (HIGH and LOW) - it works properly in the output state
- this happens on both my UNO R2 and R3 versions
One source (Arduino Rx always HIGH - Raspberry Pi Forums) stated "The arduino RX pin is high because the output from the USB / serial chip is high when it is not receiving anything. This is connected to the arduino pin through a 1K resistor so that any direct connection to that pin can pull the pin to ground. So to stop this happening you can disconnect this resistor or put a switch in it."
YIKES, this can't be true, otherwise there would be a caveat in the Arduino Reference section.
Unfortunately all pins have been assigned and I'm unable to easily swap to another pin. And, the switch has to be normal unpressed) LOW.
If DO is always HIGH on the UNO, then will a Duemillanove or a clone that doesn't use the 16U2 for USB control?
Any thought on how to resolve this issue?