You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • As above - there are two separate circuits, in and out.

    Yes, you can read from the OUT register and find out what you wrote. But that's not what digitalRead does, since it'd mean it wouldn't be able to read the actual value on the pin.

    If you care about this and for some reason can't keep track of it yourself, you can use peek to look at the register yourself. Internally Espruino can figure it out because it needs it for pin.toggle but it's not exposed any other way

About

Avatar for Gordon @Gordon started