Using edge:0 was my first step. Thats were the problem started.
I changed to 2 watches to have the option to use different debounce for falling and for raising.
Anyway, I switched back to one watch for testing.
function initWP(){
var arr = new Uint8Array(100),pnt = 0,pulsePort = D3;
pulsePort.mode('input_pullup');
function pulseHnd(e){arr[pnt++] = e.state;}
function logPulse(){
console.log(new Uint8Array(arr.buffer,0,pnt));
clearWatch();
}
setWatch(pulseHnd,pulsePort,{repeat:true,edge:0,debounce:5});
setTimeout(logPulse,5000);
}
Problem stays.
Next, based on a hint from @MaBe, used 2 wires connecting on a breadboard to simulate pulses instead of my rotary and got similiar problem. This time I've falling edges without raising between (2nd and 3rd example)
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.
Using edge:0 was my first step. Thats were the problem started.
I changed to 2 watches to have the option to use different debounce for falling and for raising.
Anyway, I switched back to one watch for testing.
Problem stays.
Next, based on a hint from @MaBe, used 2 wires connecting on a breadboard to simulate pulses instead of my rotary and got similiar problem. This time I've falling edges without raising between (2nd and 3rd example)