There's no easy function to call. You could try something like:
E.enableWatchdog(1);
while(1);
I'm not sure if it works, but it should do. You might notice problems with USB when it comes back though (as it may have disconnected and reconnected very quickly).
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.
There's no easy function to call. You could try something like:
I'm not sure if it works, but it should do. You might notice problems with USB when it comes back though (as it may have disconnected and reconnected very quickly).