For the complete documentation index, see llms.txt. This page is also available as Markdown.

Current Control Mode

Current Control uses a PID controller to run the motor at a consistent current, providing a consistent torque. The PID controller is run using the setpoint, in Amps, and the internally measured current draw.

It is called as shown below:

m_controller.setSetpoint(setPoint, ControlType.kCurrent);

API Docs: setSetpoint

using namespace rev::spark;

m_controller.SetSetpoint(setPoint, SparkBase::ControlType::kCurrent);

API Reference: SetSetpoint

Last updated

Was this helpful?