Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Extend EEPROM via I2C connection with ESP8266 and make it use for storing the data

Status
Not open for further replies.
Look for an ESP8266 module that brings the I2C interface to external pins and connect them directly to the external EEPROM. The ESP8266-01 module (the 8 pin one) is not suitable due to lack of IO pins.

Note that the ATHC02C only has 256 addresses so you won't be able to store much in it.

Brian.
 


From what you specified above, it will not be stored a bulk data, but just settings at large time intervals. It will not be necessary to use an external EEPROM memory, as the ESP8266 modules has plenty of r/w FLASH available. Note that these modules has a limited I/O available, and this way you would not waste 2 pins for that.
 

Hello, I am using AT24HC02C https://store.ncd.io/product/at24hc02c-256-byte-eeprom-i2c-mini-module/ to extend EEPROM with ESP8266 but need some suggestions about how can I store the my wifi credential and average of values of my temperature sensor in EEPROM for life time ? Any leads on this will much helpful

you can store any datatype to the eeprom
char - 1byte, int type -2bytes
so, its better to store the char datatype. in case you want to store the wifi credentials to eeprom like ssid and password, you need to specify the address where you want to store the char. begin your eeprom and specify the size. First specify the size of char array where you want to store your ssid and password. use the eeprom.write(addr,data);
You can do it like this


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
eeprom.begin(length of address);
 
//to write to eeprom
 
char ssid[30];//store ssid here
charpass[30];//store pass here
 
for (n=0;n<ssid.length()+1;n++){
 eeprom.write(n,ssid[n]);
}
 
for(int n= 31; n<pass.length()+1;++n){
 eeprom.write(n,pass[n]);
}
 
//to read from the eeprom
 
char datassid[];
char datapass[];
 
for(int r=0; r<30 r++){
  datassid += eeprom.read(r-1); 
}
//similarly for datapass

 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top