You can find PID example code in the Industrial Controls Tutorial from Parallax

Regards

Jurie