Wrote P-controller for the motor