Hello guys I am using an esp8266 as a data logger and logging the data to the SPIFFS.
At the moment it is working by saving temperature values and I can access the txt file via web interface.
My question is the following:
Im using 2M flash size and after some time I would guess that the memory gets full.
Whats happens then ? Does the program just begins automatically writing from the beginning of the file ?
Do I get some kind of error or what can I do to avoid this situation ?
I searched for a long time on google and I can't seem to find an answer.
I'm using fs.h and the following commands:
SPIFFS.begin();
SPIFFS.format();
const char* filename = "/temperature.txt";
File f = SPIFFS.open(filename, "a");
f.println("DATA" + String(i));
i++;
f.close();
What kind of commands can I use to check my remaining file size ?
Is there a function to start writing again at the beginning or the file ?
Or is there a function to delete the oldest value and keep writing at the end of the file ?
I find this topic about SPIFFS very diffifult to find information for my questions above.
And thanks for the support guys.