Inverting the Motor
One configuration that can be easily changed is the direction the motor turns forward. This can be set using the following method, and by providing a boolean for weather or not the motor should be inverted.
Examples
motor.setInverted(false); // default settting
// ...
motor.setInverted(true); // swap "forward" and "reverse"
Method Details
Set the inversion status of the motor to be either inverted or not inverted.
setInverted(boolean inverted);
Parameters:
inverted
If the motor be inverted or not.
Last updated
Was this helpful?