Tomo Yamanaka / Mbed 2 deprecated Distance_Sensor_Sample

Dependencies:   mbed

You are viewing an older revision! See the latest version

Homepage

About GP2Y0A21YK

GP2Y0A21YK is a distance sensor and can be controlled by using the AnalogIn.
The range of this sensor is 10-80cm.

About sample program

This program outputs distance between the object to the terminal.
Please use in the range of 10-80cm because of the sensor specifications.
Even if the distance is less than 10cm, this program outputs the distance to the terminal.
However, since the output value is not a correct value, note the malfunction.

About wiring

SensorGR-PEACH
White wireA0
Orange wireGND
Black wire5.0V

All wikipages