Documentation ¶
Overview ¶
Package microphone implements a driver for a PDM microphone. For example, the Adafruit PDM MEMS breakout board (https://www.adafruit.com/product/3492)
Datasheet: https://cdn-learn.adafruit.com/assets/assets/000/049/977/original/MP34DT01-M.pdf
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { // SampleCountForSPL is number of samples aka size of data buffer to be used // for sound pressure level measurement. // Once Configure() is called, changing this value has no effect. SampleCountForSPL int // Gain setting used to calculate sound pressure level Gain float64 // ReferenceLevel setting used to calculate sound pressure level. ReferenceLevel float64 // contains filtered or unexported fields }
Device wraps an I2S connection to a PDM microphone device.
func New ¶
New creates a new microphone connection. The I2S bus must already be configured.
This function only creates the Device object, it does not touch the device.
func (*Device) GetSoundPressure ¶
GetSoundPressure returns the sound pressure in milli-decibels.
Click to show internal directories.
Click to hide internal directories.