I just checked on one here, and if you actually physically connect the pin to 3V then you can read that value back, so digitalRead does work.
digitalRead
I can't be sure why you can't read what you're outputting. Is it possible that you've actually managed to sort that pin to ground somehow?
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I just checked on one here, and if you actually physically connect the pin to 3V then you can read that value back, so
digitalRead
does work.I can't be sure why you can't read what you're outputting. Is it possible that you've actually managed to sort that pin to ground somehow?