SHA2017-badge/Firmware

Use nvs for configuration storage.

annejan opened this issue · 2 comments

Currently stores in config.json via https://github.com/SHA2017-badge/micropython-esp32/blob/master/esp32/modules/database.py
Currently only stores name in https://badge.sha2017.org/files/521

Want to use NVS http://esp-idf.readthedocs.io/en/latest/api-reference/storage/nvs_flash.html

Current idea:

Start with 2 Namespaces badge and user

user will store name (and later more personal settings)

badge will store wifi.ssid, wifi.password and possibly type (like WPA2 ent etc)
badge can store mpr121.base.0 .. mpr121.base.7 too

TODO

  • badge_nvs component
  • move nvs_flash_init() to central badge_nvs_init() routine
  • include badge_nvs_init() in badge_init() (before configurable things like badge_mpr121_init())
  • micropython hooks for using it from there

todo: mpr121.base.0 etc

Now with wifi_settings app and all.

mpr121.base.0 .. mpr121.base.7 can now be changed for use next boot!!