Hi,
I have a project that I am working on, and I have an Arduino UNO with an RTC, SD card reader, LCD screen and a couple pressure transducers..
I have everything hooked up and soldered correctly (to my knowledge) and everything is working perfectly, with the exception of the clock.
When I update the sketch, the time is accurate. However, when I unplug the Arduino after uploading the sketch, and wait a few minutes to pass, the RTC will not keep the correct time, and will instead reset back to the same time that I uploaded the sketch onto the Arduino. I need it to maintain the correct time.
My RTC device is from Adafruit, and is the DS1307 RTC Breakout.
Any help would be greatly appriciated!
Adafruit DS1307RTC Not Keeping Correct Time When Unplugged
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- JJohnson062
- Posts: 4
- Joined: Mon Jun 25, 2018 10:25 pm
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Adafruit DS1307RTC Not Keeping Correct Time When Unplugg
There is a line of code in the examples that sets the RTC to the compile time that you need to comment out or remove.
- JJohnson062
- Posts: 4
- Joined: Mon Jun 25, 2018 10:25 pm
Re: Adafruit DS1307RTC Not Keeping Correct Time When Unplugg
Thank you for the quick reply, Franklin, I appreciate your assistance.
I haven't had much time to play around with the matter, but when I get home tonight I will try to mess around some more.
I will try what you suggested and let you know how it works out.
Thank you!
I haven't had much time to play around with the matter, but when I get home tonight I will try to mess around some more.
I will try what you suggested and let you know how it works out.
Thank you!
- JJohnson062
- Posts: 4
- Joined: Mon Jun 25, 2018 10:25 pm
Re: Adafruit DS1307RTC Not Keeping Correct Time When Unplugg
As it turned out, you were correct! I commented out the "adjust" and sure enough it works just fine now!franklin97355 wrote:There is a line of code in the examples that sets the RTC to the compile time that you need to comment out or remove.
Cheers.
Please be positive and constructive with your questions and comments.