MicroPython I2S Audio with the ESP32 @atomic14
MicroPython I2S Audio with the ESP32  @atomic14
Uploaded May 2021 | Updated November 2026, 11 hours ago
I2S is now in the main branch so you should be able to use the nightly builds. If you follow this video then you'll need to replace "bufferlen" with "ibuf" - thanks Anders Weile for flagging this up.

Does Micropython support I2S Audio on the ESP32? Almost - let's build a custom version that includes support and try it out.

Thanks to PCBWay for sponsoring this video, PCBWay offer PCB Production, CNC and 3D Printing, PCB Assembly and much much more. You can find their details here: PCBWay.com/?from=atomic

I2S is not yet officially supported, but there is a Pull Request on GitHub that adds it in.

We can build a custom version of Micropython pretty easily. We just need the ESP-IDF from here: github.com/espressif/esp-idf.

And then we can get a copy of Micropython from here: github.com/micropython/micropython

and merge in the pull request with I2S support: github.com/micropython/micropython/pull/7183

The full commands to set up the IDF are:

git clone -b v4.2 --recursive github.com/espressif/esp-idf.git
cd esp-idf
./install.sh
. export.sh

And then to build our custom version of Micropython:

git clone git@github.com:micropython/micropython.git
git fetch origin pull/7183/head:i2s_support
git merge i2s_support
make -C mpy-cross
cd ports/esp32
make submodules
make BOARD=UM_TINYPICO

You can find a bunch of sample code here for the I2S pull request: github.com/miketeachman/micropython-i2s-examples

And I've pushed up my sample code here: github.com/atomic14/micropython-i2s-esp32-test

You can pick up the I2S Amplifier (MAX98357) here - amzn.to/3cg88Z5
And the TinyPico I'm using here - amzn.to/3vVoONp

----
Patreon: patreon.com/atomic14
ko-fi: ko-fi.com/atomic14
MicroPython I2S Audio with the ESP32DIY eBook Reader - Build your own Kindle using an ESP32Why This ESP32 Reset Button Didn’t WorkHacking and Disassembling Philips Hue LightsESP32-S3 WebCam + IR WebCam!Why did I fix this?Amazon Basics vs SanDisk: I Cut Them OpenLots of Stuff - And a NEW PCB! Its a rare mailbag video.This brings back happy memoriesUpgrade Your Old Keyboard: USB Rechargeable Hack!Mastering ESP32 Deep Sleep: Timers, GPIOs & Touch Sensors ExplainedSingle Button Games for the ESP32-C3 0.42 Inch OLED Module #arduino #esp32
atomic14 |

MicroPython I2S Audio with the ESP32

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER