Analog input and output on ESP32 #1800
-
Hi, For example like the following code: void record_end(){ BR |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
No you can't use the DAC and ADC at the same time! |
Beta Was this translation helpful? Give feedback.
-
I have the impression that there is some strange bug in the Espressif code. I tried to circumvent it, and made sure that there are no errors any more. Could you retry if it is working now. The following test sketch is running now w/o giving any errors: #include "AudioTools.h"
AnalogAudioStream analog;
void setup() {
Serial.begin(115200);
AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Info);
for (int j = 0; j < 5; j++) {
Serial.println("Recording...");
assert(analog.begin(adc.defaultConfig(RX_MODE)));
delay(1000);
Serial.println("end...");
analog.end();
Serial.println("Playing...");
assert(adc.begin(analog.defaultConfig(TX_MODE)));
delay(1000);
Serial.println("end...");
analog.end();
}
}
void loop() {
}
|
Beta Was this translation helpful? Give feedback.
No you can't use the DAC and ADC at the same time!
You can use them in sequence but since audio requires a lot of space you need to store it on a SD drive or eventually PSRAM which will be filled quite quickly