upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
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 | |
GP2Y0A (int pin) | |
~GP2Y0A () | |
float | value (float aref, uint8_t samples) |
float value | ( | float | aref, |
uint8_t | 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 |