Skip to main content Link Menu Expand (external link) Document Search Copy Copied

void driveTo(double x, double y)

This function will drive the robot to a point on the field. It will use the default pid controller to do so.

Explanation

This function invokes the same function that followPath invokes. It uses a 2 control point array so that the path is a straight line.

Example

//This will drive the robot to the point (12, 12) on the field
wc.driveTo(12, 12);