import time
time.sleep(0.1) # Wait for USB to become ready
from machine import I2C,SoftI2C,Pin,RTC
from pico_i2c_lcd import I2cLcd
#i2c=I2C(0,sda=Pin(26), scl=Pin(27), freq=400000)
i2c=SoftI2C(sda=Pin(26), scl=Pin(27), freq=400000)
lcd_address=i2c.scan()[0]
lcd=I2cLcd(i2c,lcd_address,2,16)
lcd.move_to(0,1)
rtc=RTC()
rtc.datetime((2024,1,2,1,11,35,25,30))
while True:
dat=rtc.datetime()[4:]
lcd.clear()
lcd.move_to(4,0)
lcd.putstr(f"{dat[0]}:{dat[1]}:{dat[2]}")
time.sleep(1)