Real Time Clock

For the LCC project I had to add a real time clock (RTC) so that it could manage the light schedule independently of a PC. I added a fairly generic RTC shield. I could have used this one or this one. They both use the I2C bus and the DS1307 RTC chip.

The example from LadyAda didn’t allow me to manipulate the date/time components well enough so I went with a library that pulls the date/time in BCD format.  The issue was that I needed those preceding zeros on numbers less than 10. 8:8:8 is not as easy to read as 08:08:08 to me. The library I used allowed me to prepend the zero when necessary.

The library is from the Arduino Playground and also has lots of time related functions that work with any DS1307 chip.

 

 

Advertisements

Author: Helicopter Jeff

I'm a vinyl decal cutting and designing, Astrophotography and general photography capturing, RC helicopter/quad copter pilot, Arduino and Raspberry Pi hardware/software developer, network, scripting and troubleshooting ninja living in the metro NY area. I am passionate about my hobbies so much I do them for a living. There's nothing better than getting paid to do what you love.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s