Yep - save() is a bit like hibernating a PC - it saves the whole contents of RAM to flash - that includes any modules that were loaded in as well.
The only thing you have to watch out for is if you've got any external components that need configuring after power-on (like a display). In that case you need to put the initialisation code in onInit or on('init', ...), but if you required a module anywhere in your code, it will have been loaded in by the Web IDE and saved with save().
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.
Yep -
save()
is a bit like hibernating a PC - it saves the whole contents of RAM to flash - that includes any modules that were loaded in as well.The only thing you have to watch out for is if you've got any external components that need configuring after power-on (like a display). In that case you need to put the initialisation code in
onInit
oron('init', ...)
, but if you required a module anywhere in your code, it will have been loaded in by the Web IDE and saved withsave()
.