This is a sandbox application where you can play with a basic, manually-tuned PID control loop. The goal of this control loop is to keep the red circle as close as possible to the mouse pointer. In other words, the setpoint is defined as the mouse pointer's position, and the error is defined as the (directed) distance between the red circle and the mouse pointer. By tuning the PID gain coefficients, the red circle's ability to follow the pointer can be enhanced. Additionally, you can tune the frequency at which the control loop runs. Charts of the X-axis error and Y-axis error are provided to help visualize the control loop's effectiveness.

Source code available on GitHub