mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
pybricks.robotics: Add GyroDriveBase.
This commit is contained in:
committed by
laurensvalk
parent
95a12a7386
commit
8bca5eb6e4
@@ -14,10 +14,10 @@ drive_base = DriveBase(left_motor, right_motor, wheel_diameter=56, axle_track=11
|
||||
# Drive forward by 500mm (half a meter).
|
||||
drive_base.straight(500)
|
||||
|
||||
# Turn around clockwise (180 degrees)
|
||||
# Turn around clockwise by 180 degrees.
|
||||
drive_base.turn(180)
|
||||
|
||||
# Drive forward again to drive back.
|
||||
# Drive forward again to get back to the start.
|
||||
drive_base.straight(500)
|
||||
|
||||
# Turn around counterclockwise.
|
||||
|
||||
Reference in New Issue
Block a user