I want a simple count number next to the fileName when I log measurements to the SD like, DataLOG001.csv and each time I turn on the device I want the device to create a new fileName DataLOG002.csv, DataLOG003.csv...
I am very inexperienced and I have tried a lot of things but without luck.
Right now I use this normal code
File dataFile = SD.open("DataLOG.csv", FILE_WRITE);
Serial.print("Writing to file: " );
Serial.println("DataLOG.csv");
dataFile.println("");
dataFile.println("Count,GAS(ppb),GAS_ADC,Temperature,Humidity,Days,Hours,Minutes,Seconds");
dataFile.close();
You will find the source code attached.
Then, I tried to implement the code from the examples below into my code but I didn't manage to make it work properly.