Hi
I'm trying to check if a filename exists, if it does, I save my new file with a different name.
But every time i execute SD.exists("filename") the arduino just freezes.
// (This is just a cutout of the real code)
char filename[] = "TEST1.TXT";
int filename_counter = 1;
while( SD.exists(filename) ) { //As long as another file by this name exists: change it
filename_counter++; //Counts up the number for the file
filename[4]=char(filename_counter); //Edits the number in the file
}
Even just writing:
int a = SD.exists("1"); //(Which shouldn't exist)
It freezes
(SD.open() works just fine)