18 lines
279 B
Python
Raw Normal View History

2021-10-01 00:21:50 +08:00
import Arm2D
line = Arm2D.Line()
res = line.on()
line.off()
line.moveTo(20)
while True:
2021-10-26 09:27:33 +08:00
if right.read() == 1:
print('right')
2022-01-10 21:14:29 +08:00
2021-10-26 09:27:33 +08:00
if left.read() == 0:
2022-01-10 21:14:29 +08:00
print("left")
2021-10-26 09:27:33 +08:00
if up.read() == 0:
2022-01-10 21:14:29 +08:00
print('up\n')
2021-10-26 09:27:33 +08:00
if down.read() == 0:
print('down')