Hi,
I also have this RTC module. I have wired it to an arduina mega adk r3. The wiring is correct, and I'm trying to use the library from the adafruit tutorials.
I have managed to set the time on the RTC, but I have some problem with it now.
Here is my code:
void loop () {
DateTime now = RTC.now();
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
Serial.print(" since 1970 = ");
Serial.print(now.unixtime());
Serial.print("s = ");
Serial.print(now.unixtime() / 86400L);
Serial.println("d");
delay(3000);
}
My problem is that the RTC seems like it has stopped ticking, here is the output from it:
2013/2/23 21:48:58
since 1970 = 1361656138s = 15759d
2013/2/23 21:48:58
since 1970 = 1361656138s = 15759d
2013/2/23 21:48:58
since 1970 = 1361656138s = 15759d
2013/2/23 21:48:58
since 1970 = 1361656138s = 15759d
2013/2/23 21:48:58
since 1970 = 1361656138s = 15759d
2013/2/23 21:48:58
Do you have any idea, what could be my problem?
Thank You!