I am new to this community so I hope that this is posted the right place.
As a part of my project this semester, I need to use my Arduino mega2560 to make a working clock - one that counts seconds, minutes, hours, days of week, months and years. For this reason, I bought the DS1307 RTC module.
The connections from the DS1307 to the Arduino mega2560 are made, and it works. I have tried the time module by adding source code from other programmers. It worked really well.
My question is: does anyone know where to find libraries for this module or a main-program that will program my Arduino to do the same but with C or C++ language?
By the way, I don't really need to display the time on any kind of screen.
It works pretty fine with the Arduino IDE. However, I have to use Atmel Studio to upload the code to my Arduino. When I try to do this, I get various errors.
neiklot:
Perhaps if you were to say (verbatim) what they are....
'DEC' undeclared (first use in this function
'Serial' undeclared (first use in this function)
'Wire' undeclared (first use in this function)
implicit decleration of function 'delay'
implicit decleration of function 'readDS3231time'
implicit decleration of function 'setDS3231time'
recipe for target 'main.o' failed
and then multiple errors saying: unknown type name 'byte'.
I have downloaded and included the wire.h library to the atmel studio project :/..