The Sharp GP2D12 IR Range Sensor takes a continuous distance reading and reports the distance as an analog voltage with a distance range of 10cm (~4") to 80cm (~30").
The interface is 3-wire with power, ground and output. This sensor comes with a 3 Pin JST cable.