Pages: [1]   Go Down
Author Topic: Library for saving non-volatile data to flash on Arduino Due  (Read 776 times)
0 Members and 1 Guest are viewing this topic.
Sweden
Offline Offline
Newbie
*
Karma: 3
Posts: 9
"Everything should be made as simple as possible, but no simpler"
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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:
// 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.
Logged


Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 632
Posts: 50182
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Sweden
Offline Offline
Newbie
*
Karma: 3
Posts: 9
"Everything should be made as simple as possible, but no simpler"
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It will unfortunately empty the stored data. I have not found a way of not making that happen.
Logged


0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12443
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hope they decide to add an EEPROM I2C chip to the next board revision...
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: