PID Library

PID()

Description

Creates a PID controller linked to the specified Input, Output, and Setpoint. The PID algorithm is in parallel form.

Syntax

PID(&Input, &Output, &Setpoint, Kp, Ki, Kd, Direction)

Parameters

Input: The variable we're trying to control (double)
Output: The variable that will be adjusted by the pid (double)
Setpoint: The value we want to Input to maintain (double)
Kp, Ki, Kd: Tuning Parameters. these affect how the pid will chage the output. (double>=0)
Direction: Either DIRECT or REVERSE. determines which direction the output will move when faced with a given error. DIRECT is most common.

Returns

None

Share