Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S2 Compilation Error #290

Closed
Quaestuosa opened this issue Mar 23, 2022 · 5 comments
Closed

ESP32-S2 Compilation Error #290

Quaestuosa opened this issue Mar 23, 2022 · 5 comments

Comments

@Quaestuosa
Copy link

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:

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

For some reason the data type i2s_dac_mode_t is unknown. 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

// 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);
}

@schreibfaul1
Copy link
Owner

The library is developed for the ESP32. The ESP32S2 is too weak. Since V2.0.1 there are problems with the internal DAC, espressif/esp-idf#7684. Please use an external DAC with 16 bit, the audio quality is much better

@Quaestuosa
Copy link
Author

Thank you very much for this quick and helpful reply which explains everything. Somehow I had in mind that a Wrover module would be good for this library because of the extra PSRAM to buffer a stream.
I will return this module and get an ESP32 cam module instead which also has a PSRAM and even a SD card slot.
I'm aware that the internal DAC has some limitations. But for now I'll have to use it until my order of an external DAC arrives which may take some weeks.
Again, thank you very much for your kind support!

@schreibfaul1
Copy link
Owner

The S2 only has one core and that's not enough for uninterrupted audio playback. The internal DAC is sufficient for low sound quality. With the Arduino version 1.0.6 there will be no problems.

best regards
Wolle

@Quaestuosa
Copy link
Author

Thanks for this insight. I was not and still am not aware of the differences in the boards available on the market.
So I guess a ESP32 cam board with a Tensilica LX6 Dual-Core and 4MB PSRAM should work, would you think so?

@Quaestuosa
Copy link
Author

Reviewing the ESP32 cam boards I had to notice that the pins for an external DAC are not available at the connector but are used for the camera.

When selecting an ESP32 for an internet radio project it is important to me that

  • it has an external antenna (IPEX connector) for good Wifi signal
  • it has enough PSRAM to buffer the data stream
  • programming with the Arduino IDE is supported

Would you know about some readily available modules that are suitable for such a project?

Thank you very much for your advice.
Cheers
Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants