arduino-audio-tools
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
AnalogDriverArduino Class Reference

Please use the AnalogAudioStream: Reading Analog Data using a timer and the Arduino analogRead() method and writing using analogWrite();. More...

#include <AnalogAudioArduino.h>

Inheritance diagram for AnalogDriverArduino:
AnalogDriverBase

Public Member Functions

int available () override
 
int availableForWrite () override
 
bool begin (AnalogConfig cfg)
 
void end () override
 
size_t readBytes (uint8_t *values, size_t len) override
 Provides the sampled audio data.
 
size_t write (const uint8_t *data, size_t len) override
 

Protected Member Functions

int decimation ()
 
int effectiveOutputSampleRate ()
 Returns the effective output sample rate.
 
bool isCombinedChannel ()
 
bool isDecimateActive ()
 The requested sampling rate is too hight: we only process half of the samples so we can half the sampling rate.
 
bool setupBuffer ()
 
void setupPins ()
 pinmode input for defined analog pins
 
bool setupTimer ()
 
bool setupTx ()
 
void updateAvg ()
 
void updateMinMax (int value)
 

Static Protected Member Functions

static void callback (void *arg)
 Sample data and write to buffer.
 

Protected Attributes

int avg_value
 
BaseBuffer< uint8_t > * buffer = nullptr
 
AnalogConfig config
 
int count
 
int decim = 1
 
uint16_t frame_size = 0
 
bool is_combined_channels = false
 
int max
 
int min
 
int result_factor = 1
 
TimerAlarmRepeating timer
 

Detailed Description

Please use the AnalogAudioStream: Reading Analog Data using a timer and the Arduino analogRead() method and writing using analogWrite();.

Author
Phil Schatzmann

The documentation for this class was generated from the following file: