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
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
![DIY eBook Reader - Build your own Kindle using an ESP32
Ive been busy playing with another ESP32 based e-Paper display. Once again were sponsored by PCBWay - https://www.PCBWay.com/?from=atomic
There are some interesting aspects to this project:
Were using deep sleep to save on battery - check out my recent video on this subject for a deep dive: https://youtu.be/YOjgZUg_skU
Were also using an SD Card in SPI mode using a few of the spare GPIO pins on the board - weve covered this previously in this video: https://youtu.be/bVru6M862HY
Parsing, layout out and rendering ePub files is pretty interesting. Its a good challenge to try and get this working nicely on embedded devices like the ESP32.
[0:00] Introduction/demo
[1:07] ePub format overview
[1:34] Whats inside an ePub file?
[1:49] The content.opf file
[2:20] ePub components
[2:32] Challenges
[2:55] Getting ePub files onto the device
[3:08] Touch screen failure
[3:24] Listing files on an SD Card
[3:33] Enabling long files names in the ESP-IDF
[3:51] Reading ZIP archives on the ESP32
[4:15] Parsing the content.opf file to get the book structure
[4:56] Should we build a web browser?
[5:34] Parsing the XHTML content
[5:52] Laying out the content
[7:28] Deep sleep
[7:41] Show me the code!
Everything is on GitHub here: https://github.com/atomic14/diy-esp32-epub-reader
If youve got an ESP32 based ePaper display then please give it a go!
You can get the LilyGO board Im using from here: https://s.click.aliexpress.com/e/_9u8DGd (affiliate link)
Patreon: https://www.patreon.com/atomic14
ko-fi: https://ko-fi.com/atomic14 DIY eBook Reader - Build your own Kindle using an ESP32](https://i.ytimg.com/vi/VLiCgB0odOQ/mqdefault.jpg)








![Mastering ESP32 Deep Sleep: Timers, GPIOs & Touch Sensors Explained
Were doing a deep dive into deep sleep! Thanks to PCB Way for sponsoring the videos - https://www.PCBWay.com/?from=atomic
The ESP32 e-Paper weather display lasted exactly 2 months on its 1000mAh battery. It achieves this by spending most of its time in deep sleep, only waking up every 30 minutes to get a fresh forecast and update the display.
Were going to look at:
[0:00] Intro
[1:33] How to get into deep sleep
[1:42] Waking up by using a timer
[2:56] Waking up by GPIO pins (single and multiple)
[5:26] Waking up with the touch sensors
[6:13] How to know why you were woken up?
[7:37] How to persist state during deep sleep?
[8:24] How much current do we use in deep sleep?
Its pretty interesting stuff and opens up some great possibilities.
Sample code for this video is here: https://github.com/atomic14/esp32_deep_sleep
Heres a link to one of @AndreasSpiess videos (the guy with the Swiss accent) https://www.youtube.com/watch?v=ajt7vtgKNNM hes got a bunch more videos measuring different ESP32 boards - definitely worth having a watch.
Patreon: https://www.patreon.com/atomic14
ko-fi: https://ko-fi.com/atomic14 Mastering ESP32 Deep Sleep: Timers, GPIOs & Touch Sensors Explained](https://i.ytimg.com/vi/YOjgZUg_skU/mqdefault.jpg)
