ESP32 "Eeprom" (nvs) read/write

Hi All,

I’ve got an oled menu setup that has now outgrown the flash size of my arduino nano, and I’m looking to use an ESP32 to run the robotics + oled display/menu.

It looks like the available libraries for eeprom won’t function with the ESP32’s as the ESP32 has its own “eeprom.h” library that uses the chip’s nvs.

Is there anyone that has a node/wrapped library of the esp32 eeprom.h with simple byte write/read functions?

I’ve tried my best to create my own node to wrap the library into xod, but my lack of any coding talent is killing my progress.

I’ve (probably incorrectly) forked the library on Github and moved the “eeprom.h” file to the root folder for anyone that is feeling helpful enough to wrap the library?

Hi @mci-ryan,

For the ESP32, it appears that the preferences library (arduino-esp32/libraries/Preferences at master · espressif/arduino-esp32 · GitHub) is favoured over the eeprom library. I’ve wrapped the preferences library:
wayland/esp32-preferences — XOD

I’m in the process of writing a guide to the use of this library, which I will share soon. However, in the meantime I’m sure you’ll be able to figure it out from the example patches provided.

The library enables you to store and retrieve key-value pairs. Supported data types are: byte, number and string.

2 Likes

You’re an absolute legend! I’ll give it a go this afternoon

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.