The functions were moved to separate files in the DS1307tiny library.
The sample code in the ds1307tiny_test1 module looks cleaner now. The output should be something like this …
Note that one of the challenges working with a real-time clock the the DS1307 is to set it up with the correct time at the beginning.
- One way is to do that programmatically – write a program for the microcontroller that will set the clock to specific date & time and run that program right at the specified in the code date & time.
- Another way of doing taht is to use some sort of USB-to-I2C module and set the date & time from the computer. Such modules exist but they are kind of expensive for the simeple thing they do.
Source code available at: https://bitbucket.org/tinusaur/ds1307tiny
More information about the library will be available at its own page: DS1307tiny