Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By btidey
#75400 Don't worry about flash sectors. SPIFFS looks after all that.

If the data is binary byte data and the arrays are fixed size then the simple method would be to just write the binary data buffer direct to the file (not as strings like println) and you can then use read to retrieve it back to a buffer.

Edit: Example

Code: Select all#define len 256
unsigned char buffer[len]
File f;


Write
Code: Select all     f = SPIFFS.open("/buffer", "w");
     f.write(buffer, 256);
     f.close();


Read
Code: Select all     File f = SPIFFS.open("/buffer", "r");
     f.read(buffer, 256);
     f.close();