
Am I missing something like a jumper to use the prototyping area, or something? Any suggestions appreciated. Next step is to desolder and remove the RTC and try again from scratch, but that isn't the preferred option

thanks
Stephen
And change them to:SoftI2C i2c(A4, A5);
(Or any other pins for that matter.)SoftI2C i2c(SDA, SCL);
Code: Select all
void syncRTCHardware()
{
char currentTime[16];
char currentDate[16];
sprintf(currentDate, "%02d/%02d/%04d", month(), day(), year());
sprintf(currentTime, "%02d:%02d:%02d", hour(), minute(), second());
Serial.print("Server Time: ");
Serial.print(currentDate);
Serial.print (" ");
Serial.println(currentTime);
DateTime now = RTC.now(); // reads time at beginning of loop
byte HOUR = now.hour();
byte twelveHour = now.hour() - 12; // Variable used to display 13+ hours in 12 hour format
byte zeroHour = 12; // Variable use to convert "0" zero hour to display it as 12:00+
byte displayHour;
byte MIN = now.minute();
byte SEC = now.second();
char* meridian;
if (now.hour() == 0) // First we test if the hour reads "0"
{
displayHour = zeroHour;
meridian = "AM";
}
else if (now.hour() >= 13) // if no, Second we test if the hour reads "13 or more"
{
displayHour = twelveHour;
meridian = "PM";
}
else
{
displayHour = now.hour();
meridian = "AM";
}
char stamp[16];
lcdA.clear();
sprintf(stamp, "%02d:%02d:%02d-%02s", displayHour, MIN, SEC, meridian);
lcdA.print(3, 0, stamp);
sprintf(stamp, "%02d/%02d/%04d", now.month(), now.day(), now.year());
lcdA.print(3, 1, stamp);
// time library is synchronized by the Blynk WidgetRTC
if (Blynk.connected())
{
if (now.hour() != hour() || now.minute() != minute() || now.second() != second())
{
Serial.println("Resynching RTC Time...");
terminal.println("Resynching RTC Time...");
RTC.adjust(DateTime(year(), month(), day(), hour(), minute(), second()));
terminal.flush();
}
}
}
BLYNK_CONNECTED()
{
rtcWidget.begin(); // Synchronize with widget (server) time on connection
setSyncInterval(5 * 60); // subsequent time sync interval in seconds (5 minutes)
}