Set the pin mode properly in the first place and use pin.read()
I suppose it all comes down to documentation so I'll make a PR and we're good ;)
@Rollo 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 suppose it all comes down to documentation so I'll make a PR and we're good ;)