Sound with ESP32 - ...
Clear all

Sound with ESP32 - I2S Protocol

DroneBot Workshop
Workshop Guru Admin
Joined: 3 years ago
Posts: 1096
Topic starter  

Build an Internet Radio, an MP3 Player, and display microphone waveforms with an ESP32 and some I2S peripherals. Learn to use the I2S sound protocol with the ESP32.

Article with code:\esp32-i2s

You might have seen the term “I2S” on the spec sheet for the ESP32 and may have just assumed that it was a form of I2C.  Well, you would be mistaken - I2S is a protocol for manipulation of digital audio, and today we will be using it with the ESP32.

After a short primer on I2S and digital audio fundamentals, we will use an I2S microphone module with an ESP32. We’ll display the microphone output as a waveform on the Arduino IDE Serial Plotter.

After that, we will grab a library from GitHub, and we’ll use it to build an MP3 player with an I2S amplifier module. We’ll then use the same library and the ESP32 WiFi to create an Internet Radio.

Finally, we will convert our simple Internet Radio into a stereo device, with a volume control.

Here is what is in today's video:

00:00 - Introduction

01:27 - I2S & Digital Audio Intro

08:25 - I2S Peripherals

10:18 - Using an I2S Microphone

18:37 - I2S MP3 Player

28:31 - Simple I2S Internet Radio

33:41 - Stereo Internet Radio

43:56 - Conclusion

Remember, if you need any of the code used here, you'll find it on the DroneBot Workshop website at\esp32-i2s .

Hope you enjoy the video!


"Never trust a computer you can’t throw out a window." — Steve Wozniak

Noble Member
Joined: 2 years ago
Posts: 2262

Is it possible to change the sketch to send a Bluetooth stream to something like an Alexa? I know the ESP32 has a Bluetooth transmitter, but so far can't find info to make use of it.

It is considered poor judgement to traverse a chasm in 2 leaps.

New Member
Joined: 3 weeks ago
Posts: 3

Hello good afternoon.

I know my question is unrelated to the topic.
I'm trying to do this web radio project and I'm having the following problem after programming my ESP32.

info Request failed!

Does anyone have a way to solve this problem?


Thank you