This link included a lot of great history of the Sharp IR Distance detectors and the min and max ranges of different sensors.
You read data on the sensor like any other analog sensor
To smooth out the incoming data simply output the average of the last ten readings
To calibrate the sensor output use the map method.
This processing sketch was used to graph the incoming byte data from the arduino
These were the actual sketches used in class and includes the serial.outs that have been removed from the examples above.
Download IR Total