Here's the code:
Code: Select all
char filename[15];
strcpy(filename, "GPSLG000.CSV");
for (uint8_t i = 0; i < 1000; i++) {
filename[5] = '0' + i/100;
filename[6] = '0' + i/10;
filename[7] = '0' + i%10;
// create if does not exist, do not open existing, write, sync after write
if (! SD.exists(filename)) {
break;
}
}
GPSLG099.CSV
GPSLG1:0.CSV
GPSLG1:1.CSV
GPSLG1:2.CSV
A colon is inserted instead of a number. What do I need to do to correct this problem?