function onInit() {
// Call to an function that kicks off my code
}
save();
My undertstanding is that onInit() fires automatically on startup/reset. I make save() the last line of code. I can't advise if this is the best way, but it does seem to work.
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 do it like this:
My undertstanding is that
onInit()
fires automatically on startup/reset. I makesave()
the last line of code. I can't advise if this is the best way, but it does seem to work.