file creation date and longer file names on logger shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
andywatson
 
Posts: 28
Joined: Wed Feb 16, 2011 12:40 am

file creation date and longer file names on logger shield

Post by andywatson »

I love the Adafruit datalogger shield. However, whenever I take the SD card with files that were created by the logger and try to view them on my PC, it always says the files were created on 1/1/2000 at 1:00AM. It's not a big deal since then actual data in the columns of the .csv file contain correct timestamps from the RTC. But is there a way to get the creation date of the file on the SD card to be recorded properly by the logger? Also, are we limited to just 8 character filenames forever, or is there a chance somebody will come up with a solution that'll allow longer filenames?

brimus
 
Posts: 13
Joined: Sun Aug 07, 2011 2:35 am

Re: file creation date and longer file names on logger shield

Post by brimus »

The reason is the file is created before the RTC is even enabled. I noticed the same thing but for me it is not a concern. You can try in the code to see if you move the starting of the RTC to before the if that will work. I am not sure what you would need to do to have the SD library get the time before creating the file.

Also you may need to remove the writing to the log file of if the RTC fails as the log file will not have been created yet if you make the change.

After looking in the SD library I did not see a way to control the file creation time. So it looks like at this time you cannot change the file creation time from the default 1-1-2000.

User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Re: file creation date and longer file names on logger shield

Post by fat16lib »

For file creation time-stamp see the AnalogLogger example in the latest SdFat here http://code.google.com/p/sdfatlib/downloads/list.

I have not implemented long filenames since it would make SdFat several KB larger. Long filenames were added to FAT filesystems in a very inefficient way. I have may implement long filenames as an option in the future but this is a very low priority.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”