OVMS3-idf/examples/storage/nvs_rw_blob
Angus Gratton 800bffb8b0 cmake: Add CMakeLists.txt files for all examples
Generating using convert_to_cmake.py, with some minor cleanup
2018-04-30 09:59:20 +10:00
..
main Examples: Demonstrate the usage of esp_err_to_name 2018-03-13 14:27:00 +01:00
CMakeLists.txt cmake: Add CMakeLists.txt files for all examples 2018-04-30 09:59:20 +10:00
Makefile Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
README.md Fixed broken links in documentation 2017-09-07 18:48:15 +02: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 storage/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.