Sharp IR and Servo

well at first I followed this but I ended up finding someone that
used a slightly different method for a project very similar to mine so I disregarded this website but it could be useful for you
http://luckylarry.co.uk/arduino-projects/arduino-using-a-sharp-ir-sensor-for-distance-calculation/