sets/technic/off-roader: Use smoothness profile.

For the drive wheels, smoothness is more important than precision.
This commit is contained in:
Laurens Valk
2023-03-17 15:08:57 +01:00
parent 3c6ab92432
commit 64e5ab172e
4 changed files with 16 additions and 8 deletions
@@ -4,8 +4,10 @@ from pybricks.tools import wait
# Initialize the motors
steer = Motor(Port.C)
front = Motor(Port.A, Direction.COUNTERCLOCKWISE)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE)
# Initialize the motors with increased smoothness profile.
front = Motor(Port.A, Direction.COUNTERCLOCKWISE, profile=360)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE, profile=360)
# Lower the acceleration so the car starts and stops realistically.
front.control.limits(acceleration=1000)
@@ -11,8 +11,10 @@ keyboard.register(stdin)
# Initialize the motors.
steer = Motor(Port.C)
front = Motor(Port.A, Direction.COUNTERCLOCKWISE)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE)
# Initialize the motors with increased smoothness profile.
front = Motor(Port.A, Direction.COUNTERCLOCKWISE, profile=360)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE, profile=360)
# Lower the acceleration so the car starts and stops realistically.
front.control.limits(acceleration=1000)
@@ -4,8 +4,10 @@ from pybricks.tools import wait
# Initialize the motors and sensor.
steer = Motor(Port.C)
front = Motor(Port.A, Direction.COUNTERCLOCKWISE)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE)
# Initialize the motors with increased smoothness profile.
front = Motor(Port.A, Direction.COUNTERCLOCKWISE, profile=360)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE, profile=360)
sensor = ColorDistanceSensor(Port.D)
# Lower the acceleration so the car starts and stops realistically.
@@ -4,8 +4,10 @@ from pybricks.tools import wait
# Initialize the motors.
steer = Motor(Port.C)
front = Motor(Port.A, Direction.COUNTERCLOCKWISE)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE)
# Initialize the motors with increased smoothness profile.
front = Motor(Port.A, Direction.COUNTERCLOCKWISE, profile=360)
rear = Motor(Port.B, Direction.COUNTERCLOCKWISE, profile=360)
# Lower the acceleration so the car starts and stops realistically.
front.control.limits(acceleration=1000)