Arduino Library

Talking to the RTC

The RTC is an i2c device, which means it uses 2 wires to to communicate. These two wires are used to set the time and retrieve it. On the Arduino UNO, these pins are also wired to the Analog 4 and 5 pins. This is a bit annoying since of course we want to have up to 6 analog inputs to read data and now we've lost two.

For the RTC library, we'll be using a fork of JeeLab's excellent RTC library, which is available on GitHub. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip

Rename the uncompressed folder RTClib and check that the RTClib folder contains RTClib.cpp and RTClib.h

Place the RTClib library folder your arduinosketchfolder/libraries/ folder.
You may need to create the libraries subfolder if it's your first library. Restart the IDE.

We also have a great tutorial on Arduino library installation at:

Once done, restart the IDE

Last updated on 2016-09-06 at 05.28.31 PM Published on 2013-01-29 at 06.49.14 PM