Hi there,
I am looking for feature in micropython so I can track output pins on esp8266 boards.
According to this answer it is possible to achieve in Arduino C, but does it work for mycropython? https://arduino.stackexchange.com/a/36350/34626
Thanks
Is it possible to read current pin state
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: Is it possible to read current pin state
from the docs
see at http://docs.micropython.org/en/v1.9.3/e ... e.Pin.htmlPin.value([x])
This method allows to set and get the value of the pin, depending on whether the argument x is supplied or not.
If the argument is omitted then this method gets the digital logic level of the pin, returning 0 or 1 corresponding to low and high voltage signals respectively. The behaviour of this method depends on the mode of the pin: