joystick using servo motor

do you know how to control the servo motor position using a PID. can you send a sample code please