i2s compatibility

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
Mike Teachman
Posts: 100
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: i2s compatibility

Post by Mike Teachman » Fri Jan 31, 2020 4:28 pm

Hi,

Are you using the MicroPython interface for ESP-ADF?
https://github.com/espressif/esp-adf/tr ... python_adf

This MicroPython work by Espressif is new to me. The commit history in github for this work starts in October 2019. Quite recent activity.

Option 2:
you can use the I2S pull request to send/receive audio samples to/from the ES8388 codec chip on the LyraT boards. But, you will first need a MicroPython driver to control the ES8388 codec using an I2C interface. I took a look at the ES8388 datasheet -- it has over 50 programming registers. That suggests it will be a challenging driver to write (although Espressif has already done this work in C code).

Wow - I'm quite impressed with the work done by Espressif on the ESP-ADF. It is open source MIT licence. Lots to learn from this work, with potential integration into MicroPython I2S. For example, they already support MP3 decoding.
https://github.com/espressif/esp-adf

janchri
Posts: 2
Joined: Thu Jan 30, 2020 1:13 am

Re: i2s compatibility

Post by janchri » Sat Feb 01, 2020 11:01 am

Yes the effort espressif is putting into the development is quite nice. However, I am and never will be quite a good c/c++ programmer. When I found your lib, I was hoping to swap towards uPy. This would be actual fantastic as then my whole workflow would be Python :-) The uPy work done by Espressif, is not really working for me. Maybe I need to wait for some more commits and updates. Thank you anyway for your time and effort!

zaord
Posts: 57
Joined: Fri Jan 31, 2020 3:56 pm

Re: i2s compatibility

Post by zaord » Tue Apr 28, 2020 12:32 pm

Hi, Is it possible to use I2S with stm32 ports board luike Pyboard ?
It is not a defaut machine routine !
How to compile that on PYB11?

Thanks

User avatar
Mike Teachman
Posts: 100
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: i2s compatibility

Post by Mike Teachman » Tue Apr 28, 2020 3:37 pm

zaord wrote:
Tue Apr 28, 2020 12:32 pm
Hi, Is it possible to use I2S with stm32 ports board luike Pyboard ?
At the moment, I2S is supported only for the ESP32, using this PR:
https://github.com/micropython/micropython/pull/4471

these docs describe how to use the PR
https://github.com/miketeachman/micropy ... s-examples

Work has started to support I2S on the pyboards, and possibly the ESP8266. I'll update the forum when there is progress to report.

zaord
Posts: 57
Joined: Fri Jan 31, 2020 3:56 pm

Re: i2s compatibility

Post by zaord » Tue Apr 28, 2020 4:41 pm

Do you think is a question of weeks, months or year ? ;)
It's just for knowing if I move to esp or not.

Thanks a lot for all the works you did !
That's wonderfull !

All the lights for you :)

zaord
Posts: 57
Joined: Fri Jan 31, 2020 3:56 pm

Re: i2s compatibility

Post by zaord » Tue Apr 28, 2020 4:45 pm

Just a technical question, how can I use a Pull request on github to update my micropython local folder ? I suppose there is a special git command, or should I download a zip copy of this micropython branch ?

User avatar
jimmo
Posts: 2262
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: i2s compatibility

Post by jimmo » Tue Apr 28, 2020 11:40 pm

zaord wrote:
Tue Apr 28, 2020 4:45 pm
Just a technical question, how can I use a Pull request on github to update my micropython local folder ? I suppose there is a special git command, or should I download a zip copy of this micropython branch ?
Two ways - you can either add the source repository (i.e. where the PR was sent from) as a "git remote", which then allows you to access the branches, or you can use a special ref from github.

i.e. when I send a PR it comes from my repo github.com/jimmo/micropython (and you can see the branch name at the top of the PR page -- e.g. this PR https://github.com/micropython/micropython/pull/5964 comes from the "libmicropython-port" branch).

I typically do this for frequent contributors where I'm likely to look at their other work in the future.

The much easier option is to do:

Code: Select all

git fetch origin pull/ID/head:BRANCHNAME
(assuming "origin" is your remote for micropython/micropython)

More info at https://help.github.com/en/github/colla ... ts-locally

User avatar
Mike Teachman
Posts: 100
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: i2s compatibility

Post by Mike Teachman » Mon May 04, 2020 4:59 am

zaord wrote:
Tue Apr 28, 2020 4:41 pm
Do you think is a question of weeks, months or year ? ;)
My ambition is to have the I2S PR updated to include the pyboard v1.1 and pyboard-D in 2-3 months.

How do you want to use I2S on the pyboards? e.g. audio out to an amplifier? or, audio in with a microphone?

zaord
Posts: 57
Joined: Fri Jan 31, 2020 3:56 pm

Re: i2s compatibility

Post by zaord » Thu May 07, 2020 4:30 pm

I an an enginner and luthier and I need to develop for that for a micropython aided tuning tool ;)
So I have plenty of sensor (flowmeter, barometric sensor, IR sensor, mostly in I2C, and also a I2S microphone.

This will be mixed with FFT / intermodulations pitch measuring algoruthm and a TFT screen. I am using some of those powerful STM32H7 processor but I will maybe try a prototype with esp32.

zaord
Posts: 57
Joined: Fri Jan 31, 2020 3:56 pm

Re: i2s compatibility

Post by zaord » Thu Jun 18, 2020 10:53 pm

Hi Mike !

I am always interested By I2S port for Pyboard ;)
Thanks a lot for you work !
Please let me know when you will have finish !

Thanks

Post Reply