0

Real time clock on Arduino
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Real time clock on Arduino

by L_S on Thu Nov 30, 2017 3:33 pm

Last year I had my class make temperature sensor circuits with the time and data recorded on an SD card. Now, about a year later, I have gotten out the SD boards, plugged them into Arduinos, and the times are all incorrect (they all have had button batteries in for the whole year). And worse, when I try to reset the time according to the instructions ( with this command rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));) nothing changes.

What do I need to do to reset the time? I have also tried using this command rtc.adjust(DateTime(2017, 11, 30, 14, 12, 0)); explicitly stating the time, also with no success.

One odd thing (and this happened last year, when the correct time was being recorded) is that when I compile the code I get a Warning that says spurious .github folder in RTClib library.

Any help you can offer will be appreciated.

Thanks,
L

L_S
 
Posts: 12
Joined: Thu Nov 30, 2017 3:25 pm

Re: Real time clock on Arduino

by franklin97355 on Thu Nov 30, 2017 4:32 pm

Make sure you have fresh batteries and good contacts in the battery holder. The .github warning is an artifact due to the way github creates libraries. It adds a file for housekeeping (I think). You can ignore it or remove it.

franklin97355
 
Posts: 19427
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Real time clock on Arduino

by L_S on Fri Feb 23, 2018 9:45 am

This answer confuses me because the batteries were new when they were inserted and are supposed to last for years. And, the SD shields were also new, so I presume the contacts were clean.

Thanks for your answer. I am still grappling with this problem.

L_S
 
Posts: 12
Joined: Thu Nov 30, 2017 3:25 pm

Please be positive and constructive with your questions and comments.