RTC : setting time from host PC

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ahdavidson
 
Posts: 131
Joined: Wed Jun 03, 2009 9:59 am

RTC : setting time from host PC

Post by ahdavidson »

The example sketch for the RTC shield shows how to set the time on the clock chip. It uses the date and time when the sketch was compiled, which is pretty close to the correct time (assuming the host computer's clock is accurate). But it will be a little bit behind because of the delay between compilation, uploading, and running the sketch.

Has anyone seen or written a pair of programs (host / Arduino) that would set the time from a program running on the host and communicating over the serial port to the Arduino?

I was imagining, say, a Processing sketch that would respond to a request from an Arduino sketch, get the system time and send it back to the Arduino, which could then update the DS1307 chip.

Before I write such a utility, I was wondering if anyone had done it already. I haven't seen anything in my searches.

Thx.

User avatar
kkinderen
 
Posts: 13
Joined: Fri Dec 09, 2011 9:55 pm

Re: RTC : setting time from host PC

Post by kkinderen »

No, but it would be handy. It would be nice to have the option to set the time to UTC regardless of the system time zone.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”