You might be able to use E.enableWatchdog(seconds) - this won't work on ESP8266, but there's basically a 1 sec watchdog enabled by default.
E.enableWatchdog(seconds)
If Espruino doesn't get back to the idle loop within some time period it'll crash, so your code would look like:
function onInit() { if (f.read(ok) == false) return; // fallback f.write(ok,0); eval(f.read(code)); if (all ok) f.write(ok,1); }
@Gordon 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.
You might be able to use
E.enableWatchdog(seconds)
- this won't work on ESP8266, but there's basically a 1 sec watchdog enabled by default.If Espruino doesn't get back to the idle loop within some time period it'll crash, so your code would look like: