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

Enhanced to provide function for getting button press duration #23

Merged
merged 2 commits into from
Feb 21, 2018

Conversation

idolpx
Copy link
Contributor

@idolpx idolpx commented Jul 25, 2017

I needed my device to detect a long press for switching modes but also wanted it to detect a really long press (5000ms) to trigger saving the configuration settings to EEPROM.
These are the adjustments I made to accomplish this task.

I also added a function to reset the button state to a default unpressed state.

Added function "getPressedTicks()" to get the number of milliseconds the button was pressed
Added function "reset()" to reset the button to a default unpressed state
Added function "getPressedTicks()" to get the number of milliseconds the button was pressed
Added function "reset()" to reset the button to a default unpressed state
@mathertel mathertel merged commit def11ac into mathertel:master Feb 21, 2018
@mathertel
Copy link
Owner

Thanks a lot.

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

Successfully merging this pull request may close these issues.

2 participants