Adafruit Light-and-Temp-logger with file timestamps
Moderators: adafruit_support_bill, adafruit

Adafruit Light-and-Temp-logger with file timestamps

by fat16lib on Mon Dec 12, 2011 2: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 207 times
fat16lib
 
Posts: 593
Joined: Wed Dec 24, 2008 1:54 pm

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

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

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

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

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

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

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

by Mild Lee Interested on Fri Feb 08, 2013 8: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 3:06 am

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

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

That code does not reset the RTC. It connects to it here:
Code: Select all | TOGGLE FULL SIZE
  // 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: 31820
Joined: Sat Feb 07, 2009 10:11 am



cron