EEPROM

PeWosT
Posts: 10
Joined: Wed Feb 01, 2017 3:59 pm

EEPROM

Postby PeWosT » Sun Mar 19, 2017 4:38 pm

Hi, I want to save the ssid and the password of the network. There is a partition that I can use like the EEPROM of arduino? Or I have to use an external flash to save it?

Thanks in advance

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: EEPROM

Postby ESP_krzychb » Sun Mar 19, 2017 4:52 pm

Hi PeWosT,

Check NVS (Non-Volatile Storage) https://github.com/espressif/esp-idf/tr ... s_rw_value

PeWosT
Posts: 10
Joined: Wed Feb 01, 2017 3:59 pm

Re: EEPROM

Postby PeWosT » Sun Mar 19, 2017 6:16 pm

Hi krzychb, thank you for your response. Is it compatible with arduino IDE?

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: EEPROM

Postby ESP_krzychb » Sun Mar 19, 2017 7:34 pm

@PeWosT,

Sorry, I did not notice you have been posting in ESP32 Arduino forum.

In Arduino, NVS is implemented with Preferences library.

The library includes an example that shows how to save / read an integer counter.
As you like to save strings, then adopt this example using putString / getString methods (instead of putUInt / getUInt as in example).

Krzysztof

PeWosT
Posts: 10
Joined: Wed Feb 01, 2017 3:59 pm

Re: EEPROM

Postby PeWosT » Mon Mar 20, 2017 11:04 am

Thank you again @krzychb, I am going to try

Who is online

Users browsing this forum: Bing [Bot] and 39 guests