' Smart Sensors and Applications - PingServoCenter.bs2 ' Send 1.5 ms "center" pulses to the servo the Ping))) rangefinder is ' attached to. ' {$STAMP BS2} ' {$PBASIC 2.5} PingServo PIN 14 ' Servo directs Ping))) Center CON 750 ' Center/0-degree pulse duration BtwnPulses CON 20 ' ms between servo pulses DO ' Main loop PULSOUT PingServo, Center ' Center signal -> Ping))) servo PAUSE BtwnPulses ' 20 ms delay between pulses LOOP ' Repeat main loop