/****************************************************************************
PID Relay Output Example
https://github.com/Dlloydev/QuickPID/tree/master/examples/PID_RelayOutput
Similar to basic example, except the output is a digital pin controlling
a mechanical relay, SSR, MOSFET or other device. To interface the PID output
to a digital pin, we use "time proportioning control" (software PWM).
First we decide on a window size (5000mS for example). We then set the pid
to adjust its output between 0 and that window size and finally we set the
PID sample time to that same window size.
The digital output has the following features:
• The PID compute rate controls the rate of updating the digital output
• All transitions are debounced (rising and falling)
• Full control range (0 to windowSize) isn't limited by debounce
• Only one call to digitalWrite() per transition
*****************************************************************************/
#include <QuickPID.h>
This file has been truncated. show original