PID progaming help

I have been trying to create a PID loop and haven’t been able to figure them out. Does anyone have advice?

Lots of other posts i am sure, trying searching a bit.

There are many other threads out there. Watch this video for starters:

Note: All credit is to REX 1727B.