PowerBroker2 / ArduPID

PID library for Arduinos with greater accuracy than the legacy Arduino PID library
MIT License
85 stars 23 forks source link

How to change P, I, and D parameters after running begin? #12

Closed alexiscruzdavid closed 1 year ago

alexiscruzdavid commented 1 year ago

Looking to edit the P, I, and D coefficients dynamically.

PowerBroker2 commented 1 year ago

You can change the gain variables directly in your sketch whenever/wherever you'd like - the same ones you pass to the begin() function

Aman-Anas commented 8 months ago

Is it preferred to use the setCoefficients() function for dynamically setting PID? the PID gains in begin() are not passed by reference, unlike the input, output, and setpoint.

From the example

myController.begin(&input, &output, &setpoint, p, i, d);