December 18, 2012

New Arduino time-zone and DST calculation library

 Arduino enthusiast Jack Christensen has published a new library that works in conjunction with the Arduino time library. The purpose of his "timezone" library is:

to allow a Real Time Clock (RTC) to be set to Universal Coordinated Time (UTC) and then convert the UTC time to the correct local time, whether it is daylight saving time (a.k.a. summer time) or standard time. Whether a hardware RTC is present or not is immaterial; the Time library will function as a software RTC without additional hardware, although software RTC accuracy will be determined by the accuracy of the microcontroller's system clock.

That's really useful, and will help bring various clock and timing projects to life - including an adjustable world-time clock for radio enthusiasts or those with a distributed workforce. You can find the library download and instructions at Jack's github page. And for more, we're on twitter and Google+, so follow us for news and product updates as well.

The most important part of any clock project is the inclusion of an accurate real-time clock IC. Here at Freetronics we have the Maxim DS3232 real-time clock IC module:

Apart from keeping accurate time for years due to the temperature-controlled oscillator and having a tiny coin-cell for backup, it is very simple to connect to your Arduino project. A driver library allows your program to easily set or read the time and date. Perfect for clock projects, dataloggers or anything that needs to know the date and time. Furthermore it contains a digital thermometer and 236 bytes of non-volatile memory to store user settings and other data. For more information, check out the module page here

Leave a comment

Comments have to be approved before showing up.