Are you able to get the date,time values that you want from the RTC?
I am able to get the correct date/time from the RTC, but had removed the serial print portion of the code to simplify.
If serial print function is used i get the following:
SD Card initialisation completed successfully
21/02/2018 11:46:54, 1 data value now 476
21/02/2018 11:46:55, 2 data value now 476
21/02/2018 11:46:56, 3 data value now 476" etc.
Your code seems a bit garbled but essentially the same as mine, although I'm not sure removing the card "without restarting" is such a great idea.
You can check the clock and set the filename in Setup.
You can check the date in the loop thereby only needing to set the filername if the day has changed, i.e. after midnight e.g.
if (today != day)
today = day;
Thanks Nick, will try this today. Would you be able to send over your code for me to compare to make sure i'm going along the right lines?
Thanks in advance!