Well, the idea is that you use save() to save everything (including those two values) into flash... You can always call save() from your own code as well, if you want to allow the user to set the time in a way that'll survive resets.
setTime() would be better for allowing the user to change the time - however I wonder how many cases there are where the board would end up being hard reset by the user... Usually you'd just set it up and have it stay working until the battery ran down.
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.
Well, the idea is that you use
save()
to save everything (including those two values) into flash... You can always callsave()
from your own code as well, if you want to allow the user to set the time in a way that'll survive resets.setTime()
would be better for allowing the user to change the time - however I wonder how many cases there are where the board would end up being hard reset by the user... Usually you'd just set it up and have it stay working until the battery ran down.