Hi guys i'm aksing for your help because i'm little stuked with this issue:
I'm writing sensors value to a file .csv using SPIFFS memory and a "flag" read == 1 is to read and if read == 0, write the file:
if (read == 1) {
f = SPIFFS.open(file, "r");
} else {
f = SPIFFS.open(file, "a");
}
but I would like to have only ,lets say, 100 value written inside the file and then restart to write the new value from beginning of the file (without delating the file.csv), rewriting line by line each cycle and keeping the "old" value:
when the 100 line is reached, then the new value is stored in line 1 then line 2 , 3 ecc
in this case how i can proceed?