-
• #2
If i change the code to this:
setInterval( () => { if(digitalRead(D16) == 0) { console.log('D16'); } if(digitalRead(D17) == 0) { console.log('D17'); } if(digitalRead(D18) == 0) { console.log('D18'); } if(digitalRead(D19) == 0) { console.log('D19'); } }, 100);
The error goes away
-
• #3
I'm having the exact same problem - using
setWatch
on the ESP32 sometimes reboots when one of the buttons is pressed.I think this is something to do with how GPIO interrupts the handled by gpio_intr_handler (in jshardware.c) - the code does not disable further interrupts and might be invoked again while processing (buttons generate a lot of interrupts when switching from one state to another, this is why debouncing is needed).
-
• #4
Seems like there is an open issue for this:
https://github.com/espruino/Espruino/issues/2342
Hiya,
I have this simple piece of code:
Randomly when one of the buttons is pressed I get this error:
And it just goes into a loop and keeps printing this out. Using this Firmware: espruino_2v18_esp32
Any ideas?