From 117c170d2786b229c0008fa25e219157e94f6db3 Mon Sep 17 00:00:00 2001 From: elisa Date: Mon, 17 Nov 2025 08:12:25 +0100 Subject: [PATCH] run 2 aggiornata 16/11/25 --- run_02.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/run_02.py b/run_02.py index 1c43c60..af4d9b5 100644 --- a/run_02.py +++ b/run_02.py @@ -2,6 +2,7 @@ from pybricks.hubs import PrimeHub from pybricks.parameters import Axis, Direction, Port, Stop from pybricks.pupdevices import Motor from pybricks.robotics import DriveBase +from pybricks.tools import wait from assi import A from robot_class import LazyRobot, Robot @@ -16,16 +17,23 @@ def main(robot: LazyRobot): db.settings(864, 300, 100, 50) - db.straight(610) # mission 1 + db.straight(608) # mission 1 msu_L.run_angle(1000, -570, Stop.HOLD, wait=True) # abbassamento dell'asscenzore - db.straight(50) # primo abbassamento del paletto rosso - db.straight(-100) # secondo abbassamento - db.straight(50) - msu_L.run_angle(1000, 420, Stop.HOLD, wait=False) # inalzamento ascensore + db.settings(864, 1000, 100, 50) + db.straight(40) # primo abbassamento del paletto rosso + db.straight(-80) # secondo abbassamento + db.straight(40) - db.straight(50) # missione 2 - db.arc(500, 20, then=Stop.HOLD, wait=True) - msu_L.run_angle(1000, 180, Stop.HOLD, wait=True) + msu_L.run_angle(1000, 420, Stop.HOLD, wait=False) # inalzamento ascensore + # db.settings(864, 300, 100, 50) + + db.straight(20) # missione 2 + wait(2000) + msu_L.run_angle(1000, -300, Stop.HOLD, wait=False) # abbassamento dell'asscenzore + db.arc(250, angle=30, then=Stop.HOLD, wait=True) + + msu_L.run_angle(1000, 90, Stop.HOLD, wait=True) + db.straight(10) # db.straight(-150) # mission 3 #Return Point start arc # msu_L.run_angle(1000, -1440, Stop.COAST_SMART, wait=True)