-->
Page 4 of 8

Re: EEPROM put and get methods

PostPosted: Sat Jan 09, 2016 2:29 pm
by PhilippeFromGpe
eysaku wrote: EEPROM.put(i,password3);
}


Try to add EEPROM.commit(); just after the put

Re: EEPROM put and get methods

PostPosted: Fri Jan 29, 2016 5:40 am
by Ariel
Maybe it is just that the int type is 2 bytes, so you should count up to 255.

Re: EEPROM put and get methods

PostPosted: Sun Jan 31, 2016 10:34 am
by suchloop
Does this put work as the standard put from the arduino EEPROM.h librarie in the way that it only writes if the data changes?

Re: EEPROM put and get methods

PostPosted: Mon May 30, 2016 11:09 am
by gmg
Try this:
Code: Select all#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()
{
}