ora va
This commit is contained in:
parent
04c8b29749
commit
81b6fd69fb
1 changed files with 4 additions and 5 deletions
|
|
@ -7,20 +7,19 @@ mSinistra = Motor(Port.B)
|
|||
|
||||
|
||||
def vai_avanti(speed, gradi):
|
||||
print(f"vado avanti di {gradi} a {speed}")
|
||||
mSinistra.run_angle(speed, gradi, then=Stop.NONE, wait=False)
|
||||
mDestra.run_angle(-speed, gradi, then=Stop.NONE, wait=False)
|
||||
mDestra.run_angle(-speed, gradi, then=Stop.NONE, wait=True)
|
||||
|
||||
|
||||
def turn(speed_L, speed_R, gradi):
|
||||
print("girano le palle")
|
||||
mSinistra.run_angle(speed_L, gradi, then=Stop.NONE, wait=False)
|
||||
mDestra.run_angle(speed_R, gradi, then=Stop.NONE, wait=False)
|
||||
mDestra.run_angle(speed_R, gradi, then=Stop.NONE, wait=True)
|
||||
|
||||
|
||||
print("test1")
|
||||
vai_avanti(1000, 360)
|
||||
print("test2")
|
||||
turn(1000, 1000, 360)
|
||||
print("test3")
|
||||
vai_avanti(1000, 360)
|
||||
turn(1000, 1000, 360)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue