You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I REALLY don't CARE HOW its done... name, address, location,, whatever
flash, eeprom, stones in a cup.
the example doesn't say it wont work on this board.. and the lib says it supports samd21 and 51
String fileName="something";
int i=0;
for(;i<fileName.length();i++){
EEPROM.write(i, fileName.charAt(i)); // write out 1 char of data at a time
}
EEPROM.write(i,'\0'); // add on a string terminator
EEPROM.commit(); // flush
this is a json string with variable length elements, I can imagine a max length..
The text was updated successfully, but these errors were encountered:
well, part 1, DOAH, READ ... it uses flash and flash is wiped on firmware upload.. ...
now.. part 2, I'm not getting out what I put in..
do I have to commit after each write?,
example says no
my read code
char xx[]="some string of dummy data";
if(EEPROM.isValid()){
Serial.println("config present");
Serial.println("using stored data");
// create a buffer
char x[sizeof(xx)+10];
// clear it, expect we will read less data than buffer size, most of the time.
memset(x,0,sizeof(x));
// loop thru the eeprom (whatever it is)
for (int i=0; i<sizeof(xx)+10; i++) {
Serial.print(" ");
// get a character
unsigned char y = EEPROM.read(i);
// if its not a null terminator (c stringish)
if( y != 0){
// save it in the buffer
x[i]=y;
}
// done with the read loop
else
break;
}
}
only 25 chars of my 110 chars are retrievable from flash on my Nano 33 IOT
i write ascii chars and then '\0', and then commit()
I read til I see the '\0'
i am trying to the the eeprom emulation (I guess?)
https://github.com/cmaglie/FlashStorage/blob/master/examples/EmulateEEPROM/EmulateEEPROM.ino
EEProm.read/write/isValid()
compiles ok, just always reports isValid = false
is this the right function to use?
I REALLY don't CARE HOW its done... name, address, location,, whatever
flash, eeprom, stones in a cup.
the example doesn't say it wont work on this board.. and the lib says it supports samd21 and 51
this is a json string with variable length elements, I can imagine a max length..
The text was updated successfully, but these errors were encountered: