Brake Mode

There are two types of behaviors that the motor can take when the user specifies that it should idle. These modes are called Brake Mode and Coast Mode.

Coast Mode is the most simple behavior, and the default mode. When the motor wants to idle, power is cut from the phases, letting the kinetic energy of the motor disipate through friction until the system comes to rest.

Brake Mode turns the motor into an electric generator, which converts the kinetic energy from the system into electric energy into the circuit. It accomplishes this by shorting the phases together anytime the motor is requested to be idle.

Examples

motor.setBrakeMode(false); // keep motor in coast mode 
// ...
motor.setBrakeMode(true);  // switch to brake mode

API Details

Set the brake mode status of the motor to be either in brake mode or not in brake mode.

setBrakeMode(boolean brakeMode);

Parameters:

  • inverted If the motor should be in brake mode or not.

Last updated