- brake(m);
Brakes engine m. Substitute x with 1-3 for motors 1-3 or 4 to break all motors.
- celerate(m,s,e,t);
Accelerates motor m from power percentage s to percentage e over t seconds.
- goFor(t);
Runs the previous command for t seconds.
- goToRelativePosition(d);
Runs the previous command for d marks from the vehicles current position at the time the command is called. Commonly used with motorSpeed();.
- goToAbsolutePosition(d);
Runs the previous command until the vehicle reaches d marks from where the vehicle started at the beginning of the program.
- motorSpeed(m,s);
Runs motor m at speed percent s.
- reverse(m);
Reverses which way motor m blows.
- rotateServo(a);
Rotates the servo at an angle a (between 0 and 180 degrees.)
- getVehiclePosition();
Returns the position of the vehicle relative to where it started in marks.
- getTotalMarks();
Returns the total distance the vehicle has traveled forward and backward in marks.
- getBackwardsTotal();
Returns how many marks the vehicle has traveled backwards.
- getForwardsTotal();
Returns how many marks the vehicle has traveled forwards.
- getVehicleDirection();
Returns 1 if the vehicle is moving forwards, 0 if moving backwards, and 2 if no movement is detected.