Let's Make Robots!

Ping ultrasonic sensor, servo and an Arduino

I'm trying to use a servo with my ping ultrasonic sensor to build an autonomous robot like many fellow robot poineers. 

At the moment I'm using an "for" function to rotate my servo in increments of a few degrees, take a measurement with the sonar senor, rotate a few more degrees and then take another measument etc.