Search found 69 matches

by Mike Teachman
Wed Feb 06, 2019 9:46 pm
Forum: ESP32 boards
Topic: i2s compatibility
Replies: 10
Views: 1185

Re: i2s compatibility

Thanks for mentioning this work and listing those devices - I'll have to order some and try them out. The PR I submitted addresses a gap in the functionality of the LoBo port. It is missing a core I2S piece, which is about interfacing to external I2S hardware devices via the ESP32 pins, using the I2...
by Mike Teachman
Wed Feb 06, 2019 8:18 pm
Forum: ESP32 boards
Topic: i2s compatibility
Replies: 10
Views: 1185

Re: i2s compatibility

update: PR for I2S support is submitted: https://github.com/micropython/micropython/pull/4471 usage guide and examples describing how to use this new I2S class: https://github.com/miketeachman/micropython-esp32-i2s-examples It would be great if a few enthusiasts could try out this PR and report back...
by Mike Teachman
Fri Feb 01, 2019 11:11 pm
Forum: Development of MicroPython
Topic: include i2s library for esp32
Replies: 1
Views: 293

Re: include i2s library for esp32

please check out my answer to your esp32 post
viewtopic.php?f=18&t=5900
by Mike Teachman
Fri Feb 01, 2019 3:39 pm
Forum: ESP32 boards
Topic: i2s compatibility
Replies: 10
Views: 1185

Re: i2s compatibility

I'm not aware of a uPy I2S module for the ESP32. For a project that requires an I2S microphone I ended up writing a uPy module that uses the I2S interface in the ESP-IDF. I'll be finishing that work in a couple of days, then submitting a pull request to the main uPy repo. A few things left to do, li...
by Mike Teachman
Sat Dec 29, 2018 6:03 am
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2137

Re: optimizing uasyncio performance

As expected, project time "yielded" to holiday time with family and friends ;) But, a few slices of time allowed me to experiment with the Fast IO implementation of uasyncio. https://github.com/peterhinch/micropython-async/blob/master/FASTPOLL.md A time-critical coroutine that handles microphone sam...
by Mike Teachman
Tue Dec 11, 2018 4:33 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2137

Re: optimizing uasyncio performance

It is possible to improve this using my fast_io fork of uasyncio. This enables I/O coros to be written in a way that ensures that, every time any coro yields, the scheduler checks for the ready status of the I/O coro. Then T1 is the maximum delay of any one coro, and T2 is the similar average. This...
by Mike Teachman
Mon Dec 10, 2018 5:38 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2137

Re: optimizing uasyncio performance

might have something to do with time.ticks_ms() being a 64-bit integer on loboris port using heap. In a post on his forum he says that in the next update, the behaviour will change and time.ticks_ms() will only return a 64-bit integer if the value needs it, otherwise it'll return a small int that w...
by Mike Teachman
Mon Dec 10, 2018 4:59 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2137

Re: optimizing uasyncio performance

I have doubts about uasyncio coping with i2s. It depends on how the i2s code is implemented. uasyncio can handle data streams on UARTs because the UART interface uses interrupts and buffering. So the buffer is filled below the radar of uasyncio , and so long as the latter is emptied quicker than th...
by Mike Teachman
Mon Dec 10, 2018 3:46 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2137

Re: optimizing uasyncio performance

I just found this thread and decided to test the example on an M5Stack with 4MB psRam using a Lobo stock firmware (ESP32_LoBo_v3.2.24 - 2018-09-06; psram_all). If I have the ftp and mDNS services running: await asyncio.sleep_ms(0): around 3.7-3.8 ms yield: around 2.7-2.8 ms If I have nothing but wi...
by Mike Teachman
Mon Dec 10, 2018 3:43 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2137

Re: optimizing uasyncio performance

I ran the script you posted. Getting times of around 1.6-1.7 ms using an ESP32 with 4 MB PSRAM running a build of the standard Micropython repo with the module uasyncio as frozen. There were other modules as well in that directory. Thanks a lot for trying this testcase using the mainline repo. I ap...