Step 5The program
But first install all 3 libraries that I have given like so.
Take your chip and put it in the arduino board and put the program I have added with this step.
The program is a bit messy but I did as best as I could to make it clean.
You ca set time and date in this clock so no time setting is needed when you program.
Time setting mode:
Press the "start/end setting mode" button, use the up and down buttons to set the time and the "next" button to move to the next part( it goes like this : hours, minutes,days, mouths ,years).
when you are done press the "start/end setting mode" button again.
Date:
Just press the "date/next" button.
Note:
There is no comments in the code, I will add them latter on.
| « Previous Step | Download PDFView All Steps | Next Step » |















































Thanks
1) The DS1307 can run on both modes so can find out how to do it.
2) You can just do it in software by adding an if statement and subtract 12 from the value (14 - 12 = 2)