#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define LCD_COLUMNS 20
#define LCD_LINES 4
#define RTC 0x68 // I2C 7-bit address
#define LCD 0x27 // I2C 7-bit address
LiquidCrystal_I2C lcd(LCD, LCD_COLUMNS, LCD_LINES);
void setup() {
Wire.begin();
lcd.init();
}
void loop() {
uint8_t mm, ss;
Wire.beginTransmission(RTC);
Wire.write(0x00);
Wire.endTransmission(false);
Wire.requestFrom(RTC, 2);
ss = Wire.read() & 0x7F;
mm = Wire.read() & 0x7F;
lcd.setCursor(0, 1);
lcd.print(mm >> 4);
lcd.print(mm & 0x0F);
lcd.print(":");
lcd.print(ss >> 4);
lcd.print(ss & 0x0F);
}