upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for the LV-MaxSonar-EZ family of ultrasonic rangers. More...
This sensor family returns an analog voltage corresponding to the distance of an object from the sensor in inches. It has a resolution of about 9.7 millivolts per inch with a 5.0 AREF. The differences between the various versions (EZ1, EZ2, etc) are related to the narrowness of the beam angle.
This class supports these sensors with an analog input only.
This driver was developed using an LV-MaxSonar-EZ3.
Public Member Functions | |
MAXSONAREZ (int pin, float aref=5.0) | |
~MAXSONAREZ () | |
int | inches () |
MAXSONAREZ | ( | int | pin, |
float | aref = 5.0 |
||
) |
MAXSONAREZ sensor constructor
pin | analog pin to use |
aref | the analog reference voltage, default: 5.0 |
~MAXSONAREZ | ( | ) |
MAXSONAREZ Destructor
int inches | ( | ) |
get the distance to the object in inches