-->
Page 1 of 1

NodeMCU EEPROM

PostPosted: Thu Mar 21, 2019 3:44 am
by celliott
I have a NodeMCU V1.0, software V0.9.5 build 20150318 LUA V5.1.4 which doesn't retain EEPROM data.

My application was working fine and read/write of EEPROM data was working without issue. However, with Arduino V1.8.8, I selected menu Tools - Erase Flash - All Flash Contents

Following this, the module seems to run fine, but now doesn't read/write EEPROM data.

How do I restore this functionality to my NodeMCU module? :roll:

Re: NodeMCU EEPROM

PostPosted: Tue Mar 26, 2019 2:53 am
by DIRR70
Hello celliott,

I have several NodeMCU V1.0 here (not exactly sure about the build) and I simply tried the same as you did. Using Arduino V1.8.8 too, I wasn't able to reproduce your problem. After erasing all flash contents the EEPROM still is working well!

Have you considered that the "EEPROM" is just a small file on the flash chip (where your code goes to) and if you erase it the whole flash your EEPROM is not initialized anymore, so you can't just use
Code: Select allEEPROM.begin(512);
byte value = EEPROM.read(0);

You need to write sensefull data first...
Or have you accidentally deleted the "EEPROM.begin" from your code?
How did you set the "tools"->"flash size" menu item?