Adafruit Light-and-Temp-logger with file timestamps

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
User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Adafruit Light-and-Temp-logger with file timestamps

Post by fat16lib »

Here is a modified version of the Data Logging Shield example, lighttemplogger.pde, that will set the file creation date and time on logfiles.
Attachments
lighttemplogger.zip
(2.38 KiB) Downloaded 271 times

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Adafruit Light-and-Temp-logger with file timestamps

Post by adafruit »

neat thanks!

User avatar
cra451
 
Posts: 13
Joined: Fri Nov 26, 2010 7:26 pm

Re: Adafruit Light-and-Temp-logger with file timestamps

Post by cra451 »

Perfect Thanks.... Works like a charm.

User avatar
mild lee interested
 
Posts: 7
Joined: Fri Oct 28, 2011 3:06 am

Re: Adafruit Light-and-Temp-logger with file timestamps

Post by mild lee interested »

Hmmm,
When I use this code example, each log file still resets to 1/1/2000 1:00AM
I am using the example exactly "as is" in Arduino22.
Is it possible to easily explain where the code resets the RTC?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Light-and-Temp-logger with file timestamps

Post by adafruit_support_bill »

That code does not reset the RTC. It connects to it here:

Code: Select all

  // connect to RTC
  Wire.begin();
  if (!RTC.begin()) {
    error("RTC failed");
  }
If you do not see the "RTC failed" then it has successfully connected. If your RTC is not running, it will be stuck at the default time 1/1/2000 1:00AM, you need to run one of the examples from the RTCLib to initialize it and adjust it to your computer time.

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

Return to “Arduino Shields from Adafruit”