How to set KP value of a pid program

Basically trial and error. A good place to start is 1 if using an encoder and 0.0635 with a potentiometer. Increase kP if the system doesn’t get close enough and decrease it if it overshoots.