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 22260 times Last modified on Sunday, 12 June 2016 11:20

2 comments

  • 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