How to Use NVS? #7442
-
Hi, I've found ArduinoNvs.h https://github.com/rpolitex/ArduinoNvs which does help. The biggest challenge is finding code that shows how to save a 'double' datatype into NVS on an ESP32. I did see a recommendation to put datatypes like these inside a struct, which I've done. However, I can't decipher how to save a 'struct' in NVS. Here's the struct I'd like to save in NVS Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Howdy. It's in the docs: |
Beta Was this translation helpful? Give feedback.
-
Did you take a look at the built-in Preferences examples?
On Nov 7, 2022, at 12:49 PM, Bwanna ***@***.***> wrote:
Thank you. Yes, I reviewed those docs and references, but were unable to translate that into Arduino code for use... that's why I highlighted this being a 'newbie' question. Would greatly appreciate if there was a very basic ARDUINO IDE example to reference. I just can't find any.
Thanks,
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
There’s also this: https://randomnerdtutorials.com/esp32-save-data-permanently-preferences/
On Nov 7, 2022, at 12:49 PM, Bwanna ***@***.***> wrote:
Thank you. Yes, I reviewed those docs and references, but were unable to translate that into Arduino code for use... that's why I highlighted this being a 'newbie' question. Would greatly appreciate if there was a very basic ARDUINO IDE example to reference. I just can't find any.
Thanks,
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
😃👍
On Nov 7, 2022, at 5:16 PM, Bwanna ***@***.***> wrote:
Thank you! The built in preferences works great and that link provided great examples. Very much appreciated!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
Howdy. It's in the docs:
Preferences API
Preferences Tutorial