So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Bootalito
#63821 There are multiple ways you can store some data in non volatile memory. Most of the esp memory is non volatile flash.
1. Use the eeprom. This is the easiest especially if you want to store a small amount of data. The eeprom is really just using the flash memory on the esp.
2. Use spiffs, which kinda turns the unused flash memory into a tiny ssd drive(oversimplified). Maintaing a Json file for some credentials and last 5 values is a more complex but very well suited and flexible solution.
User avatar
By Hein du Plessis
#63884
Bootalito wrote:You could use a Json file in SPIFFS, but this is insecure, and not necessary. (snip)

Thanks Bootalito - I didn't see your post. I'll check out your code for the json storage. I want to store some variables onboard while out of wifi range and I need it to survive a reboot.
User avatar
By jeffas
#63925 I'm using the EEPROM library to store config info. You could use that, but I would recommend storing anything security-related in an encrypted (or at least obfuscated) form.
You could also use that for storing the readings, but, if I understand correctly, EEPROM is not designed for a large number of writes, so it may not be suitable for that sort of data.