Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By xtal
#43638 ARDUINO 1.6.8 sdk 1.5.1(~~~~`) ESP8266
I need help reading EEPROM data. using the following code all I get is 255 at all locations...
What am I doing Wrong??? or Is the AP IP address stored somewhere else ????

Code: Select all#include <EEPROM.h>

//==========  DISPLAY EEPROM ATTEMPT =================================
EEPROM.begin(4096);
  ShowEP(0,16,536);                        // start 0,  16/line, stop 536
EEPROM.end();                              //  ? needed ?
//--------------------------------------------------------------------


int ShowEP(int x, int w,int z) {           // start, line length, end
  int y;int i;int q;                       // defines
Lp1: 
  Serial.println();                        // crlf
  Serial.print(x);                         // print val of x
  Serial.print(" - ");                     // x= 0  w= 16  z= 96
  q = x+16;                                // q = next line #
  for (x ; x < q ; ++x)                    // print 0-15 values
   {    Serial.print(EEPROM.read(x),DEC);  // print EEPROM char decimal value
        Serial.print(",");                 // print ","
   }                                       // loop w times ~ 16
  if (x < z) {  goto Lp1;  }               // not last line do again
  return x ;
}