import machine
import utime
# Define LCD pin connections
rs = machine.Pin(0) # Replace with your GPIO pin numbers
en = machine.Pin(1)
d4 = machine.Pin(2)
d5 = machine.Pin(3)
d6 = machine.Pin(4)
d7 = machine.Pin(5)
# Initialize the LCD
lcd = machine.lcd(rs, en, d4, d5, d6, d7)
lcd.init()
lcd.clear()
# Display a message
lcd.putstr("Hello, Raspberry Pi Pico!")
# Wait for a few seconds
utime.sleep(5)
# Clear the LCD
lcd.clear()