""" Micropython
LCD1602 Display mit Keypad
Teil 2
"""
from LCD_Key_Modul import *
lcd.move_to(1, 0)
lcd.putstr("Young Engineers")
lcd.move_to(4, 1)
lcd.putstr("mrge.de")
time.sleep(1)
lcd.clear()
# 1234567890123456
auswahl=[ "Select Laufzeit",
"Down Stoppuhr",
"Right Counter ",
" Up Ende "]
pos=0
while True:
lcd.move_to(3, 0)
lcd.putstr("Hauptmenue")
lcd.move_to(0, 1)
lcd.putstr(auswahl[pos])
button = read_buttons()
if button==None:
pass
elif button==Select:
laufzeit()
elif button==Down:
print("Down")
elif button==Left:
print("LEFT")
elif button==Right:
print("RIGHT")
elif button==Up:
print("Up")
else:
pass
pos = (pos+1)%len(auswahl)
time.sleep(0.5)