It works... but it's clearing other intervals.
Is there a cleaner/better way to code this?
If you know how to code it better, or have your own solution please share
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I was wondering how to code given behaviour:
increment counter when button is pressed
keep incrementing when button is held down
such a behaviour is often implemented for setting hours etc.
I've tried this:
It works... but it's clearing other intervals.
Is there a cleaner/better way to code this?
If you know how to code it better, or have your own solution please share
Thanks