do I need to set the watchdog's timeout higher than my code timeout?
Yes, at least twice - I'd generally go for ~5 times the interval, just in case.
One thing to note is that once you added the watchdog you can't change it or its interval until the device physically reboots (reset() won't cut it). It's done in hardware as a failsafe so once it's been added, it can't be undone (until a reboot/power cycle)
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.
That code should work
Yes, at least twice - I'd generally go for ~5 times the interval, just in case.
One thing to note is that once you added the watchdog you can't change it or its interval until the device physically reboots (
reset()
won't cut it). It's done in hardware as a failsafe so once it's been added, it can't be undone (until a reboot/power cycle)