Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable digitalRead to return cached pin value if no callback is specified #167

Open
soundanalogous opened this issue Apr 14, 2017 · 0 comments
Assignees

Comments

@soundanalogous
Copy link
Member

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.

@soundanalogous 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
@soundanalogous soundanalogous self-assigned this Jul 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant