Replies: 1 comment
-
You can use the individual motors like you normally would. Does this example help? from pybricks.pupdevices import Motor
from pybricks.parameters import Port, Direction
from pybricks.robotics import DriveBase
# Initialize both motors. In this example, the motor on the
# left must turn counterclockwise to make the robot go forward.
left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE)
right_motor = Motor(Port.B)
# Initialize the drive base. In this example, the wheel diameter is 56mm.
# The distance between the two wheel-ground contact points is 112mm.
drive_base = DriveBase(left_motor, right_motor, wheel_diameter=56, axle_track=112)
# Drive forward by 500mm (half a meter).
drive_base.straight(500)
# You can still use the motors individually:
right_motor.run_angle(500, 360) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there anyone who know how to use motors individually after drivebase declaration?
Beta Was this translation helpful? Give feedback.
All reactions