Pages: [1]   Go Down
Author Topic: SD card File Date & Time Stamp  (Read 1208 times)
0 Members and 1 Guest are viewing this topic.
Miami
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Nada es Facil ...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm new one, one more sorry... pretty basic yet ...

I'm using the Ardwuino 2560 Mega ADK with an EtherShield with the SD card slot.

I can get the SD card info and dir, also O got the Real time now() from an NTP provider over the internet.

But when I create my new files into the SD card all my files are created with the same Date and Time as :
2000-01-01 01:00:00

not eve using the actual got time form NTP not even using the Jan 1 1970 as when the NTP is not available.

Is there any other internal system time that has to be set for the SD filesytem ?

Or issomethibg just not available for the Arduino File System ?

THanks

Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2314
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Is there any other internal system time that has to be set for the SD filesytem ?

Or issomethibg just not available for the Arduino File System ?


You can do it with an on-board RealTime Clock like the DS1307. In my projects, this is only used for backup to SD. Data aquired by local PC goes with the PC clock, and that sent over internet is timestamped at the other end.

You can use the clock to create a new file everyday, named with the date. It is then just a matter of printing the hour, minute, second to file along with the data.

Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Install the SdFat library - there is an example called Timestamp.ino describing in detail how to do it..
Logged

Pages: [1]   Go Up
Jump to: