#include <Wire.h>  // Arduino IDE 內建
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // 設定 LCD I2C 位址

void setup() {
  lcd.begin(16, 2); 
  lcd.clear();
}
int time=0;
int hour=0;
int min=0;
int second=0;
void loop() {
  delay(1000);
  time=time+1;
  second=time%60;
  hour=time/3600;
  min=time/60;
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(hour);
  lcd.setCursor(2, 0);
  lcd.print(":");
  lcd.setCursor(3, 0);
  lcd.print(min);
  lcd.setCursor(5, 0);
  lcd.print(":");
  lcd.setCursor(6, 0);
  lcd.print(second);

}