import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
import KeyPad_4x4 as keypad
import LCDI2C as lcd
password="123456"
passtmp=""
while 1:
key=keypad.key_read()
if key:
print(key)
if key=="*":
lcd.cmd_write(0x01)
passtmp=""
elif key=="#":
lcd.cmd_write(0x01)
if passtmp==password:
lcd.str_write("correct")
else:
Icd.str_write("wrong")
passtmp=""
else:
lcd.cmd_write(0xc0+4)
passtmp+=key
for i in passtmp:
lcd.str_write("*")
time.sleep(0.01)