fbpx

ESP8266 – EEPROM

ESP8266 EEPROM use to store a pic of information like wifi username and password,  during boot up stored information helps get connected with network, with this hardcode of wifi username and password could be avoided.ESP8266 have 512 bytes of internal EEPROM.

Program

#include <EEPROM.h>
int address = 0; /* Address Location*/
void setup()
{
EEPROM.begin(512); //Initialize EEPROM
EEPROM.write(address, 'A'); //Write character A  /* Write data 'A' to address location 0 */
EEPROM.commit(); //Store data to EEPROM
}
void loop()
{
char read_data = char(EEPROM.read(addr))  /* read data from address location 0 */
Serial.print(read_data);
delay(1000);
}

 

1 comment on “ESP8266 – EEPROM

Leave a Reply

Your email address will not be published. Required fields are marked *