-
• #1
-
• #2
What's connected to A4? Could it be shorted to ground?
-
• #3
So the issue is that the last
digitalRead
should return 1? As discussed in another thread on here very recently, it's not a massive surprise that the firstdigitalRead
returns 0, as before you callpinMode
,digitalRead
will make sure the pin is an input, which would make the voltage on it more or less random.Is A4 connected to anything? Which board are you using, and do you have up to date firmware?
-
• #4
Just tried it here and it works fine for me.
-
• #5
I have to date firmware and A4 is connected to a diode. I'm using this board: http://www.espruino.com/EspruinoBoard
-
• #6
All good in the hood, thanks guys!
-
• #7
Was the diode connected to GND on the other side?