diff --git a/leo/appunti.txt b/leo/appunti.txt index a8d4300..cca4fb2 100644 --- a/leo/appunti.txt +++ b/leo/appunti.txt @@ -8,3 +8,13 @@ gradi da fare (per girare di 90gradi) circ routa : 360 = strada da percorrere : x x = 360 * strada da percorrere : circ ruota + + + + +Motori: + +Motor.E == M_Up Right +Motor.D == M_Up Left +Motor.A == +Motor.B == diff --git a/menu.py b/menu.py index a3eb202..4e01b90 100644 --- a/menu.py +++ b/menu.py @@ -5,11 +5,10 @@ from pybricks.tools import hub_menu, wait import batteria from giro_leo_prova import main as run_R from robot_local import robot - -# from run_01 import main as run_1 +from run_01 import main as run_1 from run_02 import main as run_2 -PROGRAMMI = {"2": run_2, "R": run_R} +PROGRAMMI = {"1": run_1, "2": run_2, "R": run_R} def run_with_play(hub, fn, *args, **kwargs): diff --git a/run_02.py b/run_02.py index 7c35a0a..23aa949 100644 --- a/run_02.py +++ b/run_02.py @@ -1,6 +1,3 @@ -from pickle import STOP -from threading import ThreadError - from pybricks.hubs import PrimeHub from pybricks.parameters import Axis, Direction, Port, Stop from pybricks.pupdevices import Motor @@ -19,16 +16,16 @@ def main(robot: LazyRobot): db.settings(864, 300, 100, 50) - db.straight(600) # mission 1 - msu_L.run_angle(1000, -720, Stop.HOLD, wait=True) # abbassamento dell'asscenzore + db.straight(610) # mission 1 + msu_L.run_angle(1000, -420, Stop.HOLD, wait=True) # abbassamento dell'asscenzore db.straight(50) # primo abbassamento del paletto rosso db.straight(-120) # secondo abbassamento db.straight(40) - msu_L.run_angle(1000, -720, Stop.HOLD, wait=False) # inalzamento ascensore + msu_L.run_angle(1000, 420, Stop.HOLD, wait=False) # inalzamento ascensore db.straight(50) # missione 2 db.arc(500, 20, then=Stop.HOLD, wait=True) - msu_L.run_angle(1000, 360, Stop.HOLD, wait=True) + msu_L.run_angle(1000, 180, Stop.HOLD, wait=True) # db.straight(-150) # mission 3 #Return Point start arc # msu_L.run_angle(1000, -1440, Stop.COAST_SMART, wait=True)