A modified version of Lim Phang Moh sketch from www.rocketscream.com using Brett Beauregard PID lib.