Sunday, 21 April 2013 18:03

Arduino reading and writing string to EEPROM

Written by
This demonstration (writing string to EEPROM) adopted the code from Arduino Playground and I  had removed some of the features to make it simple and easy to understand.
 
 
Code below demonstrate how to write strings to EEPROM at specified location(address) and then read it back.
Read 26858 times Last modified on Sunday, 12 June 2016 11:20

3 comments

  • Comment Link Nicolas Tuesday, 28 November 2017 09:17 posted by Nicolas

    Hi there,
    I just found this page after a very long research and struggling.
    Thank you SO MUCH. This is just awesome. I don't understand Arduino doesn't offer such a lib...
    Thanks again!!
    Nicolas

  • Comment Link admin Friday, 07 October 2016 20:48 posted by admin

    When calling EEPROM.write(), data is written to the EEPROM immediately.
    I think you are looking for writeBlock(int address, const T& value)

    http://playground.arduino.cc/Code/EEPROMex

  • Comment Link baz Friday, 07 October 2016 06:59 posted by baz

    for (i = 0; i ) {
    EEPROM.write(startAddr + i, array[i]);
    }
    EEPROM.commit();
    return true;
    }

    Had to add EEPROM.commit();
    to make it work after line 31.

Leave a comment

Back to Top