From fae6a3cf15171ba2d2931974d401cd2b97d2de42 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 28 Sep 2025 19:01:12 +0200 Subject: [PATCH] aggiustamenti --- leo/ruote.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/leo/ruote.py b/leo/ruote.py index da39bc1..f9d71a8 100644 --- a/leo/ruote.py +++ b/leo/ruote.py @@ -1,7 +1,7 @@ from pybricks.hubs import InventorHub from pybricks.parameters import Axis, Port, Stop from pybricks.pupdevices import Motor -from pybricks.tools import vector +from pybricks.tools import vector, wait # from pybricks.hub import PrimHub @@ -17,10 +17,10 @@ def vai_avanti(speed, gradi): mDestra.run_angle(-speed, gradi, then=Stop.NONE, wait=True) -def turn(speed_L, speed_R, gradi): +def turn(speed, gradi): print("girogiro") - mSinistra.run_angle(speed_L, gradi, then=Stop.NONE, wait=False) - mDestra.run_angle(speed_R, gradi, then=Stop.NONE, wait=True) + mSinistra.run_angle(speed, gradi, then=Stop.NONE, wait=False) + mDestra.run_angle(speed, gradi, then=Stop.NONE, wait=True) # reset_angle() @@ -47,5 +47,7 @@ def turn(speed_L, speed_R, gradi): # while not (mSinistra.done() and mDestra.done()): # wait(10) - -vai_avanti(-2000, 6666) +# vai_avanti(-1000, 1090.17) +turn(-500, 180) +wait(2000) +turn(-500, 180)