SHARP 2Y0D21

GP2Y0D21YK0F is a distance measuring sensor unit, composed of an integrated combination of PSD (position sensitive detector), IRED (infrared emitting diode) and signal processing circuit.

http://sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0d21yk_e.pdf

Code arduino http://arduino103.blogspot.fr/2011/06/detecteur-de-proximite-infrarouge-sharp.html