I haven't personally done it, but something like this should work fine:
include "jswrap_interactive.h" void doStuff() { } JsVar *func = jsvNewNativeFunction(doStuff, JSWAT_VOID); jsvUnLock(jswrap_interface_setTimeout(func, 1000/*ms*/, 0)); jsvUnLock(func);
@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.
I haven't personally done it, but something like this should work fine: