Hello Gordon
On the EspruinoWifi. Two buttons connected: 3.3v -> A1 3.3v -> A4
Code:
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 a1=setWatch(function(e) { console.log('A4'); console.log(e); },A4, { repeat: true, edge: 'both', debounce: 200 } );
When i push the button on A4 or A1 i also get a callback on the other watch.
Output, pressed button connected on A4:
A1 { "state": false, "lastTime": 946685544.60812091827, "time": 946685548.80402851104 } A4 { "state": true, "lastTime": 946685544.78433227539, "time": 946685548.80407905578 }
I expected only receive a setWatch callback from A4.
Thanks
Sacha
@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.
Hello Gordon
On the EspruinoWifi. Two buttons connected:
3.3v -> A1
3.3v -> A4
Code:
When i push the button on A4 or A1 i also get a callback on the other watch.
Output, pressed button connected on A4:
I expected only receive a setWatch callback from A4.
Thanks
Sacha