tzapu / WiFiManager

ESP8266 WiFi Connection manager with web captive portal
http://tzapu.com/esp8266-wifi-connection-manager-library-arduino-ide/
MIT License
6.53k stars 1.96k forks source link

saved wifi creds. #621

Open elanozturk opened 6 years ago

elanozturk commented 6 years ago

Hi,how can i read and serial print saved credentials from eeprom just after/before connection?

tablatronix commented 6 years ago

Same way you do with esp.

elanozturk commented 6 years ago

i tried to read like this but gives me 0;

#include <EEPROM.h>
int address = 0;
byte value;

void setup() {
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
}

void loop() {
 value = EEPROM.read(address);
  Serial.print(address);
  Serial.print("\t");
  Serial.print(value, DEC);
  Serial.println();
address = address + 1;
  if (address == EEPROM.length()) {
    address = 0;
  }