Does MicroPython support asyncio on ESP32?
Does MicroPython support asyncio on ESP32?
I'm considering porting the azure python sdk (preview) to ESP32 but the first thing I saw in the code was this asyncio module that supports concurrency. Is this currently supported in MicroPython for ESP32? How well is it support, if I may ask? Thanks.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Does MicroPython support asyncio on ESP32?
The MicroPython implementation is uasyncio and it works well on ESP32. There is information about it here including a tutorial.
tl;dr It can be installed using upip.
tl;dr It can be installed using upip.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Does MicroPython support asyncio on ESP32?
Thanks pythoncoder, as always. I've not used MP for a while. I would humbly ask for a pointer to use upip.py. Do I just place it in my dev board , import it and call upip.install('uasyncio')?pythoncoder wrote: ↑Sun Oct 06, 2019 4:58 pmThe MicroPython implementation is uasyncio and it works well on ESP32. There is information about it here including a tutorial.
tl;dr It can be installed using upip.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Does MicroPython support asyncio on ESP32?
The magic words, as you'd find in the tutorial I referenced, are
If the import fails because upip isn't already installed you need to copy upip.py and upip_utarfile.py from the MicroPython tools directory to your target.
Code: Select all
import upip
upip.install('micropython-uasyncio')
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.