upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the GP2Y0A family of IR Proximity Sensors. More...
Sensors of this family return an analog voltage corresponding to the distance of an object from the sensor. The voltage is lower when objects are far away; the voltage increases as objects get closer to the sensor.
Public Member Functions | |
synchronized void | delete () |
GP2Y0A (int pin) | |
float | value (float aref, short samples) |
float value | ( | float | aref, |
short | samples | ||
) |
Gets an average voltage value from the sensor
aref | Reference voltage in use (usually 5.0V or 3.3V) |
samples | Number of samples to average over |