Sorry - I thought from the above that you may have sorted it... Espruino does actually include the ability to monitor a pin in a setWatch, so that may help you:
var value = 0;
setWatch(function(e) {
if (e.data) value++ else value--;
print(value);
}, A5, {data:A8, repeat:true});
I notice you're doing a print and digitalPulse. Is it possible that turning the knob quick is creating so many events that the functions can't be called quick enough and so it loses track?
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.
Sorry - I thought from the above that you may have sorted it... Espruino does actually include the ability to monitor a pin in a setWatch, so that may help you:
I notice you're doing a
print
anddigitalPulse
. Is it possible that turning the knob quick is creating so many events that the functions can't be called quick enough and so it loses track?