upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
API for the Loudness Sensor. More...
This sensor family returns an analog voltage proportional to the loudness of the ambient environment. It's output does not correspond to a particular sound level in decibels. The higher the output voltage, the louder the ambient noise level.
This device uses an electret microphone for sound input.
This driver was developed using the DFRobot Loudness Sensor V2 and the Grove Loudness sensor.
Public Member Functions | |
Loudness (int pin, float aref=5.0) | |
~Loudness () | |
float | loudness () |
Protected Attributes | |
mraa::Aio | m_aio |
Loudness | ( | int | pin, |
float | aref = 5.0 |
||
) |
Loudness constructor
pin | Analog pin to use |
aref | Analog reference voltage; default is 5.0 V |
float loudness | ( | ) |
Returns the voltage detected on the analog pin