from machine import Pin
import time
from lcd_api import LcdApi
from lcd_4bit import Lcd4bit
# Definizione pin GPIO Wokwi
lcd_rs = Pin(15, Pin.OUT)
lcd_en = Pin(14, Pin.OUT)
lcd_d4 = Pin(13, Pin.OUT)
lcd_d5 = Pin(12, Pin.OUT)
lcd_d6 = Pin(11, Pin.OUT)
lcd_d7 = Pin(10, Pin.OUT)
# Inizializzazione display
lcd = Lcd4bit(rs=lcd_rs, en=lcd_en, d4=lcd_d4, d5=lcd_d5, d6=lcd_d6, d7=lcd_d7, cols=16, rows=2)
lcd.clear()
lcd.putstr("Raspberry Pi")
lcd.move_to(0,1)
lcd.putstr("LCD 16x2")
time.sleep(3)
lcd.clear()
lcd.putstr("Progetto OK!")