#include <MicrophoneAmplitude.h>
Reads a microphone amplitude and makes it available as PeakValueProvider input.
◆ MicrophoneAmplitude()
| MicrophoneAmplitude::MicrophoneAmplitude |
( |
const byte |
analogPin = 0, |
|
|
const int |
periodMillis = 50 |
|
) |
| |
|
inline |
◆ animate()
| virtual void MicrophoneAmplitude::animate |
( |
| ) |
|
|
inlinevirtual |
Reads the microphone connected to the analog port specified by the constructor and calculates the amplitude.
Implements AnimatedEvent.
◆ getPeakValue()
| byte MicrophoneAmplitude::getPeakValue |
( |
| ) |
|
|
inlinevirtual |
◆ getRawSample()
| unsigned int MicrophoneAmplitude::getRawSample |
( |
| ) |
|
|
inline |
- Returns
- last recorded raw sample
◆ setGain()
| void MicrophoneAmplitude::setGain |
( |
byte |
gainFactor | ) |
|
|
inline |
◆ fGain
| byte MicrophoneAmplitude::fGain |
|
protected |
◆ fPeakToPeak
| byte MicrophoneAmplitude::fPeakToPeak |
|
protected |
◆ fPeriod
| unsigned MicrophoneAmplitude::fPeriod |
|
protected |
◆ fPin
| byte MicrophoneAmplitude::fPin |
|
protected |
◆ fSample
| unsigned int MicrophoneAmplitude::fSample |
|
protected |
◆ fSampleCount
| unsigned MicrophoneAmplitude::fSampleCount |
|
protected |
◆ fSignalMax
| unsigned int MicrophoneAmplitude::fSignalMax |
|
protected |
◆ fSignalMin
| unsigned int MicrophoneAmplitude::fSignalMin |
|
protected |
◆ fStartPeriod
| unsigned long MicrophoneAmplitude::fStartPeriod |
|
protected |
The documentation for this class was generated from the following file: