Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By obiezboncak
#86025 Hi everyone!

I have some solid experience with the ESP32 running the Arduino core and have been using the Preferences library to store, you guessed it, preferences, to NVS on that platform. It is an easy and smooth process. https://autoclicker.me
I am trying to port my code to the 8266 running the Arduino core because I do not need most of the capabilities of the ESP32. I am having trouble finding the library though, and multiple web searches trying to figure out if the Preferences library is supposed to work have led me nowhere. As far as I can tell the 8266 does have NVS functionality (at least it has partitioning/FS support).

Anyway my build dies quickly with "fatal error: Preferences.h: No such file or directory". Tips on how to move forward from here? I believe I have solved all my other issues at this point.

Thanks.
Last edited by obiezboncak on Thu Mar 12, 2020 11:52 am, edited 1 time in total.
User avatar
By AcmeUK
#86028
"fatal error: Preferences.h: No such file or directory"

I think you will find that preferences.H lets you store data in the ESP32's EEPROM.
According to this post the ESP8266 does not have an EEPROM:-
https://forum.arduino.cc/index.php?topic=491469.0

Perhaps it will yield a solution to your quandry.
User avatar
By martinayotte
#86051
AcmeUK wrote:According to this post the ESP8266 does not have an EEPROM:-

ESP32 doesn't have EEPROM either ... :ugeek:

Preferences class is written on top of ESP32 NVS class, but unfortunately the NVS class isn't ported to ESP8266. Maybe it could be ported, or maybe emulated, but that would not be done easily ...
https://github.com/espressif/esp-idf/tr ... /nvs_flash