Go Down

Topic: Library for saving non-volatile data to flash on Arduino Due (Read 1 time) previous topic - next topic

sebnil


I needed an replacement for the EEPROM library on Arduni Due since it does not have EEPROM at all. Flash memory can be used in a similar so I created a library with the idea to have a similar syntax as the EEPROM library. More info at http://sebastiannilsson.com/en/blogg/ersattare-for-eeprom-pa-arduino-due/
and code at https://github.com/sebnil/DueFlashStorage

Example:
Code: [Select]

// write the value 123 to address 0
dueFlashStorage.write(0,123);

// read byte at address 0
byte b = dueFlashStorage.read(0);


Perhaphs it will be useful for someone else.
http://sebastiannilsson.com

PaulS

What happens to the data when you load a new sketch?

sebnil

It will unfortunately empty the stored data. I have not found a way of not making that happen.
http://sebastiannilsson.com

MarkT

I hope they decide to add an EEPROM I2C chip to the next board revision...
[ I won't respond to messages, use the forum please ]

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy