The Sharp GP2Y0A21 is an infrared distance sensor measuring 10–80cm. It outputs an analog voltage inversely proportional to distance, requiring a lookup table or formula to convert to cm. Compact and easy to use with any ADC.
| Pin | Name | Function | Type |
|---|---|---|---|
| 1 | VOUT | Analog distance output | ADC |
| 2 | GND | Ground | GND |
| 3 | VCC | 4.5V–5.5V power | PWR |