ESP32-S2 Compilation Error
Posted: Wed Mar 23, 2022 9:11 am
Hello,
I'm trying to get a simple audio project to work using the Arduino IDE.
Hardware:
ESP32-S2-Saola-1 Wrover
Arduino-IDE 1.8.15
Installed Boards: esp32 version 2.0.2
Board-Setting: ESP32S2 Dev Module
Libraries: https://github.com/schreibfaul1/ESP32-audioI2S
The basic toolchain works: Compilation and upload of code for a simple blinking LED works fine.
Using the library ESP32-audioI2S causes compilation errors like this one:
Somehow I feel like in "Audio.h" the
#include <driver/i2s.h>
might be responsible for the problem. However I cannot find this include file in my setup to review it.
When changing the board to "ESP32Dev Module" (no S2) the code compiles. But upload is not possible because the selected board does not match the hardware.
It would be great if anyone could help me getting the code below compile in the Arduino IDE.
Thank you very much!
Cheers
Markus
The code has been stripped down to only the most basic function the show the problem.
I'm trying to get a simple audio project to work using the Arduino IDE.
Hardware:
ESP32-S2-Saola-1 Wrover
Arduino-IDE 1.8.15
Installed Boards: esp32 version 2.0.2
Board-Setting: ESP32S2 Dev Module
Libraries: https://github.com/schreibfaul1/ESP32-audioI2S
The basic toolchain works: Compilation and upload of code for a simple blinking LED works fine.
Using the library ESP32-audioI2S causes compilation errors like this one:
Code: Select all
In file included from D:\Hobby\Elektronik\Projekte\Arduino\ESP32-audioI2S\ESP32-S2-audioI2S-diyi0t\ESP32-S2-audioI2S-diyi0t.ino:7:
D:\Dokumente\Arduino\libraries\ESP32-audioI2S-master\src/Audio.h:157:37: error: 'i2s_dac_mode_t' has not been declared
Audio(bool internalDAC = false, i2s_dac_mode_t channelEnabled = I2S_DAC_CHANNEL_LEFT_EN); // #99
#include <driver/i2s.h>
might be responsible for the problem. However I cannot find this include file in my setup to review it.
When changing the board to "ESP32Dev Module" (no S2) the code compiles. But upload is not possible because the selected board does not match the hardware.
It would be great if anyone could help me getting the code below compile in the Arduino IDE.
Thank you very much!
Cheers
Markus
The code has been stripped down to only the most basic function the show the problem.
Code: Select all
// ESP32-audioI2S
#include "Audio.h"
Audio audio;
void setup() {
Serial.begin(115200);
}
void loop() {
audio.loop();
}
void audio_info(const char *info){
Serial.print("info "); Serial.println(info);
}