2021-10-01 00:21:50 +08:00
|
|
|
import Arm2D
|
2022-04-07 09:19:14 +08:00
|
|
|
import PikaStdLib
|
2022-04-16 11:38:24 +08:00
|
|
|
import ctypes
|
2021-10-01 00:21:50 +08:00
|
|
|
|
|
|
|
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:
|
2021-10-26 09:41:54 +08:00
|
|
|
print('down')
|