I have a strange phenomenon with setWatch. The Code:
clearWatch();
setWatch(demo, BTN1, {repeat:true, edge:'falling', debounce:50 });
The demo() function just does some LED blinking.
When pressing the button the watchfunction runs once most times, but sometimes twice and in rare cases it even loops forever without stopping.
Sometimes i only have to move my finger on the button without pressing it and the demo function runs.
I tried all kinds of parameter combinations, but did not find one that works once every time the button is pressed.
Any idea?
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.
Hey Gordon,
I have a strange phenomenon with setWatch. The Code:
clearWatch();
setWatch(demo, BTN1, {repeat:true, edge:'falling', debounce:50 });
The demo() function just does some LED blinking.
When pressing the button the watchfunction runs once most times, but sometimes twice and in rare cases it even loops forever without stopping.
Sometimes i only have to move my finger on the button without pressing it and the demo function runs.
I tried all kinds of parameter combinations, but did not find one that works once every time the button is pressed.
Any idea?
Thanks in advance,
Marc