|
@@ -34,8 +34,8 @@ def main():
|
|
|
|
|
|
########################## Code ############################
|
|
|
|
|
|
- led_green.on()
|
|
|
- led_red.on()
|
|
|
+ led_green.off()
|
|
|
+ led_red.off()
|
|
|
Display.lcd_line_mode = LCD.TWO_LINES
|
|
|
Display.print("Hochschule Anhalt")
|
|
|
for _ in range(0,3):
|
|
@@ -59,19 +59,19 @@ def main():
|
|
|
Display.print("up *", row=2)
|
|
|
Display.print("* *", row=3, column=7)
|
|
|
Display.print("*", row=4, column=8)
|
|
|
- led_red.off()
|
|
|
+ led_red.on()
|
|
|
sleep_us(300000)
|
|
|
Display.clear(row=2, column=8)
|
|
|
- led_red.on()
|
|
|
+ led_red.off()
|
|
|
sleep_us(300000)
|
|
|
elif button_down.value():
|
|
|
Display.clear()
|
|
|
Display.lcd_line_mode = LCD.FOUR_LINES
|
|
|
Display.print("button down * * * *")
|
|
|
- led_green.off()
|
|
|
+ led_green.on()
|
|
|
sleep_us(300000)
|
|
|
Display.clear(row=4)
|
|
|
- led_green.on()
|
|
|
+ led_green.off()
|
|
|
sleep_us(300000)
|
|
|
elif button_left.value():
|
|
|
Display.clear()
|
|
@@ -91,18 +91,18 @@ def main():
|
|
|
Display.clear()
|
|
|
Display.lcd_line_mode = LCD.FOUR_LINES
|
|
|
Display.print("button\nright *\n * *\n *")
|
|
|
- led_green.off()
|
|
|
- led_red.off()
|
|
|
- sleep_us(300000)
|
|
|
- Display.clear(row=3, column=9)
|
|
|
led_green.on()
|
|
|
led_red.on()
|
|
|
sleep_us(300000)
|
|
|
+ Display.clear(row=3, column=9)
|
|
|
+ led_green.off()
|
|
|
+ led_red.off()
|
|
|
+ sleep_us(300000)
|
|
|
else:
|
|
|
Display.clear()
|
|
|
Display.lcd_line_mode = LCD.THREE_LINES_MIDDLE
|
|
|
- led_red.on()
|
|
|
- led_green.on()
|
|
|
+ led_red.off()
|
|
|
+ led_green.off()
|
|
|
Display.print("LCD Shield")
|
|
|
Display.print("a button", row=3, column=2)
|
|
|
for pattern in range(0,9):
|