Skip to content

Commit

Permalink
AnalogDriverESP32V1
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Nov 9, 2023
1 parent d3547d2 commit 65a42ad
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 126 deletions.
7 changes: 5 additions & 2 deletions examples/tests/adc/read/read.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "AudioTools.h"
#include "AudioTools.h"

AudioInfo info(44100, 1, 16);
AudioInfo info(44100, 2, 16);
AnalogAudioStream adc;
MeasuringStream out(10, &Serial);
StreamCopy copier(out, adc);
Expand All @@ -11,7 +11,10 @@ void setup(void) {
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Info);

LOGI("Supported samples rates: %d - %d", SOC_ADC_SAMPLE_FREQ_THRES_LOW, SOC_ADC_SAMPLE_FREQ_THRES_HIGH)
#ifdef ESP32
LOGI("Supported samples rates: %d - %d", SOC_ADC_SAMPLE_FREQ_THRES_LOW, SOC_ADC_SAMPLE_FREQ_THRES_HIGH);
LOGI("Supported bit width: %d - %d", SOC_ADC_DIGI_MIN_BITWIDTH, SOC_ADC_DIGI_MAX_BITWIDTH);
#endif

auto cfg = adc.defaultConfig(RX_MODE);
cfg.copyFrom(info);
Expand Down
Loading

0 comments on commit 65a42ad

Please sign in to comment.