- Notifications
You must be signed in to change notification settings - Fork99
Help for storing variables in memory (non-volatile)#87
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Good morning, I would need tostore some variables ( short strings and integers) onnon-volatile memory and I would like it to work with bothESP32 andESP8266. Unfortunately I am not an EEPROM and RTC memory expert. ➡️Which library / method should be used to avoid compatibility problems between ESP32 and ESP8622? I would like my project to work with both hardware. I will have to read these variables very frequently but, fortunately, I will write infrequently. As soon as my project is at a good point I will make it public and insert the link of this, or I will fork! |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 10 comments
-
My (open-source) project involves the construction of an IoT device that notifies the owner if the home's electricity fails. The goal is to create something very cheap. There will be an external server (probably on amazon) that receives keepalives from various IoT devices. Thanks! 🙏 |
BetaWas this translation helpful?Give feedback.
All reactions
-
You can use built-in and betterLittleFS feature of ESP32/ESP8266 for this purpose. EEPROM or RTC has very limited storage and is not advisable to use, unless having very good reason (deep-sleep to save power, etc.).
It's also better to use myESP_WiFiManager_Lite library to save you lots of headache and unnecessary complexity (such as to understand and useJson to store / parse data by yourself). This library as well as Good Luck with your seeminglyhelpful andinteresting project. When you have more experience,I suggest you use the much betterESPAsync_WiFiManager_Lite library. Have a look atWhy Async is better |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks@khoih-prog, your words are very useful to me, like gold! The string that I need to save into the ESP32/ESP8266 is the url of the external amazon server that the IoT device will have to contact every 60 seconds to send the keepalives. This string will presumably remain fixed but ... never say never! I will study the LittleFS. One question: why do you advise me to use theLite version of your library? I just managed to get the normal version to work .. should I change and switch to Lite? 😪 Remember: you are talking to a person who lives on powerpoint and excel and every time he has to write code .. he starts to sweat! Currently I have mixed your library (the full, not the Lite) with a library for making HTTPS calls. The Client part is quite ready, the Server (AWS) part is almost ready. My wife is designing the 3D case of the device! Greetings from Milan (Italy) |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Ok, I saw that in your repositories there is always written "why" to choose one library or the other. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
@khoih-prog sorry if i contact you for this question. I just bought five 5️⃣ESP32-WROOM-32 and would like to have a unique key to distinguish them. I noticed that theESP_getChipId() function returns thesame value for all 5 devices!! 😨 Do you have any quick-win tips? Thanks you |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
For ESP32, ESP_getChipId() is defined as Try the official ESP32 exampleGetChipID to see if OK. You have to use 64 bit to avoid duplication, such as Modified code |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Tested on several ESP32 boards. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
BTW, this is the better code, to identify Organizational Unique Identifier (OUI) as well as 24-bit chipID Output |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
The newESP_WiFiManager releases v1.11.0 has just been published to fix the Be confident now and spot many more bugs 👍 Best Regards, Releases v1.11.0
|
BetaWas this translation helpful?Give feedback.
All reactions
🚀 1
-
Thank you@khoih-prog ! For me it is an honor |
BetaWas this translation helpful?Give feedback.
All reactions
🚀 1

