It could be that the signal is very noisy... The odd values happen when Espruino is interrupted but the signal has changed so quickly that when it checks what the state is, it isn't what you'd expect.
Try adding debounce: 1. to the end of the setwatch statement. .. That should help...
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.
It could be that the signal is very noisy... The odd values happen when Espruino is interrupted but the signal has changed so quickly that when it checks what the state is, it isn't what you'd expect.
Try adding
debounce: 1.
to the end of the setwatch statement. .. That should help...