Today I was testing my Arduino Audio Tools Library with an ESP32-C3 Processor. This is a RISC­ V Single­Core CPU supporting 2.4 GHz Wi­Fi and Bluetooth® 5 (LE).
Please note that it does not support classic Bluetooth, so A2DP is not available!

First I tried out my simple streams-generator-i2s sketch and there were quite some bad surprises:

  • The Log Level Info is completely disturbing the audio output. This is much worse then on a regular ESP32. Fixing this is easy, so I just changed the log level in the Sketch to Warning.
  • The signal improved, only to break up after a few seconds again. The C3 should have a comparable floating point performance like the regular ESP32, but it seems the the calculation of the sine() function is much worse. This can be resolved by decreasing the sampling rate or changing the sine generator implementation to use a table based implementation (using the SineFromTable class).

Then I tried the URL Player and that worked like a charm!

The ESP32-C3 has only a limited number of output pins, so I changed the default assignments for that chip:

#define PIN_I2S_BCK 6
#define PIN_I2S_WS 7
#define PIN_I2S_DATA_OUT 8
#define PIN_I2S_DATA_IN 9

6 Comments

Ez · 2. March 2024 at 9:17

For the C3 pin assignments, did you put that in the .ino file of the url player?

JC · 9. February 2023 at 0:17

What pin definitions would you use for this library and a C3 Lyra?

    pschatzmann · 9. February 2023 at 10:46

    I have no idea: I did not find anything useful related to the necessary pins on the internet.

Mick · 29. September 2022 at 21:40

Im looking to use a C3 as a bluetooth speaker attached to a dog , I need the range ,so I can command at distance. I cant use A2DP on BT5 , have you any advice?

    pschatzmann · 3. October 2022 at 18:54

    Well, use a real ESP32. If you want to stick with the C3 the only option is to use WIFI or ESP-Now…

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *