prima veriosne funzionante run_2
This commit is contained in:
parent
4e2d265cbc
commit
9deacee07c
3 changed files with 16 additions and 10 deletions
|
|
@ -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 ==
|
||||
|
|
|
|||
5
menu.py
5
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):
|
||||
|
|
|
|||
11
run_02.py
11
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue