You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since digital values are reported on change for any port that is enabled, we could make the callback param for digitalRead optional. However this would require some changes. One change is to enable pin reporting when a pin mode is set to board.modes.INPUT (currently it's enabled upon a call to digitalRead). Then if no callback is specified, immediately return the cached value for the specified pin.
The text was updated successfully, but these errors were encountered:
soundanalogous
changed the title
enable digitalRead to return cached pin value if not callback is specified
enable digitalRead to return cached pin value if no callback is specified
Apr 14, 2017
Since digital values are reported on change for any port that is enabled, we could make the callback param for
digitalRead
optional. However this would require some changes. One change is to enable pin reporting when a pin mode is set toboard.modes.INPUT
(currently it's enabled upon a call todigitalRead
). Then if no callback is specified, immediately return the cached value for the specified pin.The text was updated successfully, but these errors were encountered: