As the title says... Chat on...

User avatar
By dnhkng
#3320 Does anyone have some good code for a PID written in Lua?
User avatar
By gerardwr
#3333 I feel stupid, I have no idea what a PID is.
From Wikipedia, the free encyclopedia
A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in industrial control systems. A PID controller calculates an error value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error by adjusting the process through use of a manipulated variable.

That's not it, is it?
User avatar
By RichardS
#3342 Bingo.

Richard.
User avatar
By dnhkng
#3368 Yep, PID's are used on microcontrollers for a bunch of things, such as maintaining a certain temperature (ESP8266 controlled Coffee machine ) or for robotics (maintaining a certain angle, as measured by a accelerometer in a self-balancing robot).

If no one knows of good code in Lua, I'll start porting across Brett Beauregard's PID that was written for Arduino. My Lua is a bit rusty though, so it will take a while.

-Dave