I got it working and it created a file and logged dates.
Now I am in a position where it is not creating the file.
This is the function:
char filename = “LOGGER00.CSV”;
logfile = SD.open(filename, FILE_WRITE);
if (! logfile)
Serial.println(“couldnt create file”);
Serial.print("Logging to: ");
DateTime now = RTC.now();
// log time
it keeps returning couldn’t create file.
These are in the code
const int chipSelect = 4;
There is a bunch of other stuff going on so I won’t send the entire program.
Essentially it goes to a point where it is monitoring the frequency of signals sent to a digital pin and they select different cases. The case calls the logtime function you can see above. The function is not creating the file, it was previously but unsure what is different now.