You set up a calibration program exactly the same as those used for the wheel servos as described in the Robotics for the BoeBot tutorial except that, instead of using the program to adjust the servo for no motion, you mechanically adjust the PING bracket for centering. You remove the screw holding the bracket on the servo shaft, run the program, and change the position of the bracket on the servo shaft until the PING is nearly centered. Since the shaft splines have some size, you can't center the PING exactly this way. After replacing the screw holding the bracket on the servo shaft, you loosen the screws holding the servo to the BoeBot (or other robot), run the program again, and get a little more adjustment that way. After tightening everything down, you change the value in the PULSOUT statement to get the PING exactly centered. Your programs will need to use an adjustment factor that's the difference between the centered PULSOUT statement and the default 750 (1.5ms) value.
If you've got the servo on pin 13, the program would look like:
Comments
If you've got the servo on pin 13, the program would look like: