mirror of
https://github.com/pybricks/pybricks-projects.git
synced 2026-07-28 04:06:07 +00:00
sets/technic/off-roader: Use smoothness profile.
For the drive wheels, smoothness is more important than precision.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user