When my ethernet connection is failled, my program creates a new file in the SD card and saves the value of the analog pin 0, while ethernet is disconnecting it creates a new file each second.I want that each new file take to name the time and date of my counter but it is not to have time, it is for there are not 2 files with the same name. When i retrieve the name for a file I use the function SD.open to create and open a new file with this name. But i have a problems of parameters.
Here is my code :
String name=day+hour+minute; // name= number of day, hour and minute of my counter
myFile = SD.open(name, FILE_WRITE); // the problem is here, this function don't accept a String
Serial.println("fichier ouvert"); // serial print "file open"
myFile.println(data); // print the value of pin A0
Serial.println("Impossible d'ouvrir le fichier"); // serial print "Can't open file"
I don't know how to solve the problem.
thanks you in advence
PS: I'm very sorry for my bad English