The Planted Tank Forum - View Single Post - Guide: Arduino based LED controller for Current Satellite LED+
View Single Post
Old 08-31-2013, 03:28 AM   #343
Dahammer
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2010
Location: Mississippi
Posts: 118
Default

Quote:
Originally Posted by Caver View Post
To reset the clock, I've been using the 'Set Time' sketch in the examples of the DS1307 RTC library.

I pull the controller, load & run the sketch, reload the light controller sketch and put the controller back in service.

Probably unnecessary...probably misunderstanding something...but it gets the controller back closer to actual time.

I don't recall ever seeing the RTC not running message. It's possible I never checked for that.

I just now pulled the controller to clean up some temporary wiring and I added the setSyncinterval command as we discussed earlier. I'll see how it runs for the next week or so.
The DS1307RTC library is a completely different library from the one we are using, RTClib. But yeah that sketch will set the RTC to the compile time.

Anyway, adding a setSyncinterval call isn't going to help you. There is something going on with your RTC. Here is a excerpt from serial monitor after adding some debugging:
Code:
Arduino sync'ed to RTC: 22:05:20
Time: 22:05:20
No storm today
SRAM: 893
To test IR codes, send 1 - 32
Arduino Time: 22:06:20
Arduino Time: 22:07:20
Arduino Time: 22:08:20
Arduino Time: 22:09:20
Arduino sync'ed to RTC: 22:10:21
Arduino Time: 22:10:21
Arduino Time: 22:11:21
Arduino Time: 22:12:21
Arduino Time: 22:13:21
Arduino Time: 22:14:21
Arduino sync'ed to RTC: 22:15:21
Arduino Time: 22:15:21
Arduino Time: 22:16:21
Arduino Time: 22:17:21
Arduino Time: 22:18:21
Arduino Time: 22:19:21
Arduino sync'ed to RTC: 22:20:21
As you can see, it's resyncing every 5 minutes as expected.
Dahammer is offline   Reply With Quote