Search found 69 matches

by Mike Teachman
Fri Dec 07, 2018 7:27 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2648

Re: optimizing uasyncio performance

Today, it's not possible to dedicate a uPy operation to a specific ESP32 core. The closest I've seen to this ambition is an experimental dual-core option on the LoBo port . As I understand it, with this option, the uPy VM runs on one core, and the rest of the ESP32 core rtos tasks (wifi, etc) run on...
by Mike Teachman
Fri Dec 07, 2018 4:18 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2648

Re: optimizing uasyncio performance

For a nominal zero delay it is quicker to issue asyncio.sleep_ms(0) and quicker still to issue yield . Thanks for these insights! .. here are the test results: asyncio.sleep(0) = 6.6 ms delay asyncio.sleep_ms(0) = 7.0 ms delay yield = 6.5 ms delay Yield came out on top, and the _ms() version is slo...
by Mike Teachman
Fri Dec 07, 2018 3:48 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2648

Re: optimizing uasyncio performance

kevinkk525 wrote:
Wed Dec 05, 2018 9:21 am
Do you have any feature of loboris port running like ftp? They spawn a new thread making the main thread slower. Maybe this is the problem?
Thanks for this idea. I tried turning off Telnet, FTP, and MQTT. This gave about a 5% performance improvement. Not very significant, but I'll take it!
by Mike Teachman
Wed Dec 05, 2018 6:11 am
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2648

Re: optimizing uasyncio performance

Do you have other coroutines running? I don't think so ... When await asyncio.sleep(0) is called all other coroutines should either be blocked waiting on a Barrier, or sleeping. I expected the scheduler to quickly return control to the coroutine that called await asyncio.sleep(0) . The delay of 6+m...
by Mike Teachman
Tue Dec 04, 2018 7:06 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 26
Views: 2648

optimizing uasyncio performance

I'm hoping a uasyncio expert can comment on performance challenges I'm facing. I'm not a uasyncio expert and suspect that I am using the library incorrectly. Background I am using the usayncio library in a uPy project to manage operation of sensors, a display, and an I2S microphone. It was all comin...
by Mike Teachman
Mon Dec 03, 2018 11:55 pm
Forum: ESP8266 boards
Topic: Unable to operate with flash on Lolin board
Replies: 7
Views: 640

Re: Unable to operate with flash on Lolin board

Here is something that might help... with the Ampy software I always include the -d1 option. The -d1 option adds a one-second delay before ampy tries to use the raw REPL mode of operation. Using the option fixed the Ampy program hangs that I was seeing.
by Mike Teachman
Sun Dec 02, 2018 4:35 am
Forum: ESP8266 boards
Topic: Sending temperature data to....somwhere
Replies: 8
Views: 790

Re: Sending temperature data to....somwhere

Hi Chris, That's totally doable. Go to the Adafruit IO home, then create a new Feed, called say "switch". Then, open a Dashboard, create a new Toggle block and associate that block to the feed "switch". Next, in MicroPython, subscribe to the feed "switch". MQTT will update value of that feed each ti...
by Mike Teachman
Mon Nov 26, 2018 4:53 pm
Forum: Development of MicroPython
Topic: C coding examples for MicroPython Functions and Methods
Replies: 3
Views: 978

C coding examples for MicroPython Functions and Methods

In the last month I started learning how to port ESP-IDF features into the LoBo ESP32 fork. Part of the learning adventure involved writing a C file that provides examples on how MicroPython functions and class methods map into a C implementation -- with a focus on understanding the many different w...
by Mike Teachman
Mon Nov 26, 2018 4:19 pm
Forum: ESP32 boards
Topic: High level GUI lib/framework
Replies: 32
Views: 4822

Re: High level GUI lib/framework

This is a fantastic resource, thanks Mike! Just what I needed. Cool. Thanks for letting me know it was useful! If you see anything amiss please let me know and I'll tune it up. I'll post it to the dev thread as well. [/quote] I've long thought that such a guide would be useful I couldn't agree more...
by Mike Teachman
Sat Nov 24, 2018 4:53 am
Forum: ESP8266 boards
Topic: umqtt.simple trouble
Replies: 4
Views: 1336

Re: umqtt.simple trouble

Darn frustrating. I might be able to help. Please take a look at my github MQTT examples. https://github.com/MikeTeachman/micropython-adafruit-mqtt-esp8266 https://github.com/MikeTeachman/micropython-thingspeak-mqtt-esp8266 They are for Adafruit IO and Thingspeak. In classes I teach on uPy they have...