2025-03-30 13:31:04 +00:00
|
|
|
import robot
|
2025-03-27 03:00:57 +00:00
|
|
|
import time
|
|
|
|
|
|
2025-03-30 13:31:04 +00:00
|
|
|
robot.move(0.00006)
|
2025-03-27 03:00:57 +00:00
|
|
|
while True:
|
2025-03-30 13:31:04 +00:00
|
|
|
if robot.get_sensors()[0]["hitpoint"]["x"] is not None:
|
|
|
|
|
robot.turn(0.001)
|
|
|
|
|
elif robot.get_sensors()[1]["hitpoint"]["x"] is not None:
|
|
|
|
|
robot.turn(-0.001)
|
|
|
|
|
else:
|
|
|
|
|
robot.turn(0)
|
2025-03-27 03:00:57 +00:00
|
|
|
await time.sleep(0.1)
|