Drive Commands

Full Drive API reference with examples.

Manual Drive

arcade

drive.arcade(forwardPct, turnPct);

tank

drive.tank(leftPct, rightPct);

Autonomous Motion

drive_distance

drive.drive_distance(inches, maxPct);

turn_to_heading

drive.turn_to_heading(headingDeg, maxPct);

turn_to_point

drive.turn_to_point(xIn, yIn, maxPct);

swing_to_heading

drive.swing_to_heading(headingDeg, maxPct, swingLeft);

drive_to_point

drive.drive_to_point(xIn, yIn, maxPct);

drive_to_pose

drive.drive_to_pose(xIn, yIn, headingDeg, maxPct);

Async Motion

drive.drive_distance_async(inches, maxPct);
drive.turn_to_heading_async(headingDeg, maxPct);
drive.turn_to_point_async(xIn, yIn, maxPct);
drive.drive_to_point_async(xIn, yIn, maxPct);
drive.drive_to_pose_async(xIn, yIn, headingDeg, maxPct);

Use drive.motion_running() to check status and drive.stop_motion() to cancel.