ESP8266

Eeprom

Using the virtual (! the ESP8266 has no real EEPROM but uses a piece of FLASH memory instead) EEPROM on the ESP8266 is a bit different from how the Arduino does it:

  • at the beginning of your sketch you need to invoke begin(...) on the EEPROM:
    EEPROM.begin(4096);
    
    The 4096 value can be 1 upto and including 4096.
  • after writing values using EEPROM.write(...) you need to do a:
    EEPROM.commit();
    
    to make sure it gets really written to EEPROM/FLASH. No need to do the "delay(5); /* and read back written data */"-trick that seems to be required on real Arduino boards.




feedback