Have the use case to save app settings to be restore after startup/reset and decided to use .boot0.
.boot0
This is the snippet I started with:
var defaults = { a:1, b:2, c:3 }; var s = require('Storage'); if (s.read('.boot0') === undefined) { s.write('.boot0',`var settings = ${JSON.stringify(defaults)}`); settings = defaults; } print(settings); // add function to update `.boot0` if settings change ....
How do you save your app settings?
@MaBe 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.
Have the use case to save app settings to be restore after startup/reset and decided to use
.boot0
.This is the snippet I started with:
How do you save your app settings?