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