Adafruit Light-and-Temp-logger with file timestamps
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- fat16lib
- Posts: 595
- Joined: Wed Dec 24, 2008 1:54 pm
Adafruit Light-and-Temp-logger with file timestamps
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
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
- cra451
- Posts: 13
- Joined: Fri Nov 26, 2010 7:26 pm
Re: Adafruit Light-and-Temp-logger with file timestamps
Perfect Thanks.... Works like a charm.
- mild lee interested
- Posts: 7
- Joined: Fri Oct 28, 2011 3:06 am
Re: Adafruit Light-and-Temp-logger with file timestamps
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?
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?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Adafruit Light-and-Temp-logger with file timestamps
That code does not reset the RTC. It connects to it here:
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.
Code: Select all
// connect to RTC
Wire.begin();
if (!RTC.begin()) {
error("RTC failed");
}
Please be positive and constructive with your questions and comments.