evert-arias / EasyButton

Arduino library for debouncing momentary contact switches, detect press, release, long press and sequences with event definitions and callbacks.
https://easybtn.earias.me
MIT License
452 stars 63 forks source link

Does the library EasyButton work well for 365x24h continuous application? #26

Closed thkfighter closed 4 years ago

thkfighter commented 5 years ago

Is there any timer variable that will overflow when the application runs for a long time?

elC0mpa commented 5 years ago

Why are you asking this @thkfighter? Inside the library we only use the millis() function wich use the timer0 or timer1, I don't remember exactly wich of these is. But the value returned by this function overflows after more than a month. If you want to improve your skills about timing events in microcontrollers, check this link: https://github.com/elC0mpa/Arduino-Tutorials/tree/master/Timing%20Events

thkfighter commented 5 years ago

Why are you asking this @thkfighter? Inside the library we only use the millis() function wich use the timer0 or timer1, I don't remember exactly wich of these is. But the value returned by this function overflows after more than a month. If you want to improve your skills about timing events in microcontrollers, check this link: https://github.com/elC0mpa/Arduino-Tutorials/tree/master/Timing%20Events

I wonder if the button will fail when the timer variable overflows.

evert-arias commented 4 years ago

I am closing this since the question has been answered. If you find that there is an issue related to this question, please, do not hesitate to reopen the issue.