Skip to content

PIDController

Noah Zemlin edited this page Jul 28, 2019 · 1 revision

PIDController

The PIDController class doesn't represent anything physical, but is a very useful utility. View the Wikipedia page for more information https://en.wikipedia.org/wiki/PID_controller

Example code to create a PID Controller and use it.

PIDController pid;
pid.begin(0, 0.8, 0.5, 0.2); // Initalize PIDController with initial value 0, P=0.8, I=0.5, D=0.2
float output = pid.update(1, 0.5); // Get next output to send to device given our state is at 0.5 and we want to move to 1.
Clone this wiki locally