# Basic Function Calls

### celerate(m,p1,p2,t);

Accelerates or decelerates the motors (m) from a start speed (p1) to an end speed (p2) over (t) seconds.

m = motor id (motor 1 = 1, motor 2 = 2, all motors = 4)

p1 = start speed (%)

p2 = end speed (%)

t = duration of speed change (seconds)

### motorSpeed(m,p);

Sets the speed of motor (m) to a power percentage (p).

m = motor id (motor 1 = 1, motor 2 = 2, all motors = 4)

p = power (%)

### goFor(t);

Run motors (m) at their power settings for (t) seconds.

m = motor id (motor 1 = 1, motor 2 = 2, all motors = 4)

t = duration (seconds)

### brake(m);

Halts motors (m)

m = motor id (motor 1 = 1, motor 2 = 2, all motors = 4)

### reverse(m);

Reverse the polarity of motors (m).

m = motor id (motor 1 = 1, motor 2 = 2, all motors = 4)

### goToRelativePosition(m);

Moves the vehicle a certain amount of marks (m) either forward or backward depending on the sign of (m).

m = amount of marks to move

### goToAbsolutePosition(c);

Moves the vehicle to the specific offset of marks from the origin (m).

c = mark number to move to

### rotateServo(a);

Rotates the arm of the Servo from the point of origin (zero).

a= Angle of Servo arm movement between 0-180, rotates counter-clockwise.

### Resources

Motor User Manual

Reflectance Sensor Manual