run 2 aggiornata 16/11/25
This commit is contained in:
parent
fae290eef5
commit
117c170d27
1 changed files with 16 additions and 8 deletions
24
run_02.py
24
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue