Arduino library for reading and setting date and time for the DS1307 Real-Time Clock IC
Java C++ C
Failed to load latest commit information.
examples
photos
.gitignore
DS1307.cpp Changed if/else if/else for switch case in function fromNumberToWeekDay May 7, 2011
DS1307.h
README.markdown
ToDo
keywords.txt

README.markdown

DS1307 Arduino Library

If do you need to know date and time in your Arduino project, so you need a Real-Time Clock (or RTC)!

One of the most famous RTC ICs is DS1307, from Dallas Semiconductor. DS1307 uses I²C (or Two-Wire Interface - TWI) to communicate with Arduino. This library is just a layer above Wire library to make RTC easy to use.

Installation

Download the tarball, uncompress it and put the directory DS1307 inside your personal library folder (~/sketchbook/libraries/ -- on GNU/Linux) or in the Arduino-system library folder (/usr/share/arduino/libraries on GNU/Linux -- requires root access).

Examples

For now that are only 3 examples: SetDateHardcoded, SedDateSerial and ReadDate -- the names autoexplain. :-) Install the library and go to File -> Examples -> DS1307 -> (choose one example).

Hardware

There is a RTC module with DS1307 sold by SparkFun - this library was tested only with this module.

   
   


    DS1307 RTC module (front and back) from SparkFun and Arduino connected to DS1307 RTC module using jumper wires and a breadboard.

Thanks To

The code of this library is based on Wiring.org.co RTC example and Daniel Gonçalves post at LusoRobótica Forum - thanks, guys!