Re: EEPROM put and get methods
Posted: Sat Jan 09, 2016 2:29 pm
eysaku wrote: EEPROM.put(i,password3);
}
Try to add EEPROM.commit(); just after the put
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
eysaku wrote: EEPROM.put(i,password3);
}
#include <EEPROM.h>
void setup()
{
EEPROM.begin(512);
Serial.begin(115200);
pinMode(BUILTIN_LED, OUTPUT);
// write a 0 to all 512 bytes of the EEPROM
int i=0;
int data=0;
while(i<512){
EEPROM.put(i, data);
Serial.println(i);
delay(50);
++i;
}
// turn the LED on when we're done
Serial.println("Done!");
digitalWrite(BUILTIN_LED, LOW);
EEPROM.end();
}
void loop()
{
}