ESP32: NVS (Non-Volatile Storage), the right way to persist settings
Use the Preferences library to save and load settings that survive power cycles on the ESP32. Wi-Fi credentials, calibration values, and the blob storage pattern for larger data.
Tag
2 tutorials
Use the Preferences library to save and load settings that survive power cycles on the ESP32. Wi-Fi credentials, calibration values, and the blob storage pattern for larger data.
Use RTC_DATA_ATTR to keep state across deep sleep on the ESP32. Boot counters, last-known sensor values, and the gotcha that it does not survive a power cycle.