UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

Loudness Class

Module: loudness

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.
groveloudness.jpg

Item Index

Methods

Methods

Loudness

(
  • pin
  • aref
)
Number

Loudness constructor

Parameters:

  • pin Number

    Analog pin to use

  • aref Number

    Analog reference voltage; default is 5.0 V

Returns:

Number:

loudness

() Number

Returns the voltage detected on the analog pin

Returns:

Number:

The detected voltage