``
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <RTClib.h>
#include <BigFont01.h> // Include BigFont01 library
// Define I2C LCD pins
const int lcdAddr = 0x27; // I2C address of LCD
const int lcdCols = 16; // Number of columns
const int lcdRows = 2; // Number of rows
// Define RTC pins
const int rtcCls = 5; // SCL pin
const int rtcSda = 4; // SDA pin
// Initialize LCD and RTC objects
LiquidCrystal_I2C lcd(lcdAddr, lcdCols, lcdRows);
RTC_DS1307 rtc;
void setup() {
// Initialize serial communication
Serial.begin(9600);
// Initialize LCD
lcd.init();
lcd.backlight();
// Initialize RTC
rtc.begin();
rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); // Set RTC time to compile time
// Print initial time on LCD with big font
printTimeBig();
}
void loop() {
// Update time every second
delay(1000);
printTimeBig();
}
void printTimeBig() {
DateTime now = rtc.now();
// Format time as HH:MM
char timeStr[6];
sprintf(timeStr, "%02d:%02d", now.hour(), now.minute());
// Clear LCD
lcd.clear();
// Set big font
lcd.setFont(BigFont01);
// Print time on LCD with big font
lcd.setCursor(0, 0);
lcd.print(timeStr);
// Reset font to default
lcd.setFont();
}