Without debounce you'd expect that you would get multiple events though, just because sometimes the noise is so fast that my the time the IRQ handler fires the pin has already changed state.
But that obviously shouldn't cause issues with the debounce.
You should be able to work around it pretty easily if you need to just be doing some debouncing yourself though - because I imagine you're only really interested in the falling edge.
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.
Just checking, what device is this on? MDBT42?
I can reproduce it here too - a simple
setWatch(print,...)
is enough. It definitely seems broken somehow - I've filed an issue at https://github.com/espruino/Espruino/issues/1902Without debounce you'd expect that you would get multiple events though, just because sometimes the noise is so fast that my the time the IRQ handler fires the pin has already changed state.
But that obviously shouldn't cause issues with the debounce.
You should be able to work around it pretty easily if you need to just be doing some debouncing yourself though - because I imagine you're only really interested in the falling edge.