Sharp GP2Y0A02YK0F Infra Red Distance Sensor (15~150cm)
Now available from PMD Way is the Sharp GP2Y0A02YK0F infra-red distance sensor. It bounces IR off objects to determine how far away they are.
It returns an analog voltage that can be used to determine how close the nearest object is. Comes with a 3-JST interface wire. These sensors are good for short-range detection.
To use, connect black wire to ground, red wire to 5V and white wire to analog input.
Download datasheet for more information (.pdf).