OVMS3-idf/examples/08_nvs_rw_blob
2016-12-28 10:23:13 +11:00
..
main Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS 2016-12-28 10:23:13 +11:00
Makefile NVS Examples update 2016-11-10 06:52:48 +01:00
README.md NVS Examples update 2016-11-10 06:52:48 +01:00

Non-Volatile Storage (NVS) Read and Write Example

Demonstrates how to read and write a single integer value and a blob (binary large object) using NVS to preserve them between ESP32 module restarts.

  • value - tracks number of ESP32 module soft and hard restarts.
  • blob - contains a table with module run times. The table is read from NVS to dynamically allocated RAM. New run time is added to the table on each manually triggered soft restart and written back to NVS. Triggering is done by pulling down GPIO0.

Example also shows how to implement diagnostics if read / write operation was successful.

If not done already, consider checking simpler example 07_nvs_rw_value, that has been used as a starting point for preparing this one.

Detailed functional description of NVS and API is provided in documentation.

See the README.md file in the upper level 'examples' directory for more information about examples.