Corrected code. I used the same var for both setWatches. Same output.
pinMode(A1, "input_pulldown"); var a1=setWatch(function(e) { console.log('A1'); console.log(e); },A1, { repeat: true, edge: 'both', debounce: 200 } ); pinMode(A4, "input_pulldown"); var a4=setWatch(function(e) { console.log('A4'); console.log(e); },A4, { repeat: true, edge: 'both', debounce: 200 } );
@user85862 started
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.
Corrected code. I used the same var for both setWatches.
Same output.