m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
767 stars 209 forks source link

Setting set point with in a range.[Question] #23

Closed mmkumr closed 4 years ago

mmkumr commented 4 years ago

How to can I set the setPoint variable with range of values. Example setting the setPoint values between -1 to 3.

m-lundberg commented 4 years ago

Hi,

I'm not sure I understand what you mean by setting the setpoint to a range of values. The setpoint is the value that the PID is trying to achieve. If you want the PID to stop controlling when it is within a range of values you would need to do that with some logic outside of the PID itself.

m-lundberg commented 4 years ago

I'm closing this now, let me know if you have any further questions.