Hearing | lrf.hearing
The Little Robot Friends have a single electret microphone that can sense changes in volume. The microphone can be used to sense if there is a loud noise, potential talking or silence.
Functions called from within the "hearing" portion of the library have the prefix of lrf.hearing
enable()
Description
This function enables the microphone and the subsequent events it triggers.
Examples
lrf.hearing.enable();
Syntax
enable()
Parameters
none
Returns
none
Notes
none
disable()
Description
This function disables the microphone and the subsequent events it triggers.
Examples
lrf.hearing.disable();
Syntax
disable()
Parameters
none
Returns
none
Notes
none
read()
Description
This function returns the raw sensor value for the microphone volume.
Examples
var soundLevel = lrf.hearing.read();
Syntax
read()
Parameters
none
Returns
int16_t
Notes
none