I always get this message no matter how i modify my code:
RTC is NOT running!
(165/165/2165 - 165:165:85)
I've tried adjusting it in every way I can find and it still remains at that weird time. I have the two resistors removed to keep I2C down to 3.3 V.
I've tried powering it from a USB port (@5v standard) and from a 5V wall outlet.
Code: Select all
void initRTC()
{
Wire.begin();
rtc.begin();
if (! rtc.isrunning())
{
Serial.println("RTC is NOT running!");
writeSD("RTC is NOT running");
//rtc.adjust(DateTime(2015, 12, 9, 11, 18, 0));
// following line sets the RTC to the date & time this sketch was compiled
rtc.adjust(DateTime(__DATE__, __TIME__));
}
DateTime now = rtc.now();
String timestring = "(";
timestring = timestring + now.month();
timestring = timestring + '/';
timestring = timestring + now.day();
timestring = timestring + '/';
timestring = timestring + now.year();
timestring = timestring + " - ";
timestring = timestring + now.hour();
timestring = timestring + ':';
timestring = timestring + now.minute();
timestring = timestring + ':';
timestring = timestring + now.second();
timestring = timestring + ')';
timestring = timestring + ' ';
Serial.println(timestring);
}