Adafruit Light-and-Temp-logger with file timestamps

by fat16lib on Mon Dec 12, 2011 1:41 pm

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 190 times
fat16lib
 
Posts: 591
Joined: Wed Dec 24, 2008 12:54 pm

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

by adafruit on Mon Dec 12, 2011 3:02 pm

neat thanks!
User avatar
adafruit
 
Posts: 11509
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

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

by Cra451 on Mon May 14, 2012 1:35 am

Perfect Thanks.... Works like a charm.
Cra451
 
Posts: 13
Joined: Fri Nov 26, 2010 6:26 pm

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

by Mild Lee Interested on Fri Feb 08, 2013 7:37 am

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?
Mild Lee Interested
 
Posts: 7
Joined: Fri Oct 28, 2011 2:06 am

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

by adafruit_support_bill on Fri Feb 08, 2013 8:45 am

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.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am