Asynchronous requests
Posted: Sat Aug 10, 2019 5:02 pm
Hello everyone,
I have recently started making a smart watch project using the ESP32 board with OLED using Micropython.
https://github.com/Oct-opus/Ayon
When adding GET requests to fetch from Google Drive, I found out about network requests blocking the OLED from updating.
I was happy to change my code and use the uasyncio lib and call it a day ... but sadly it seems that uasyncio still uses blocking requests.
I've looked into peterhinch/micropython-mqtt and his implementation of non-blocking sockets but it seems to be turned around connecting to a server and not make REST calls.
In the uasyncion repo, they talk about making non-blocking socket calls and share this and example.
https://github.com/peterhinch/micropyth ... onblock.py
I don't know how I could use the concept in a rewrite of the urequeust module.
Would you happen to know of a solution or what I could implement?
Thank you.
I have recently started making a smart watch project using the ESP32 board with OLED using Micropython.
https://github.com/Oct-opus/Ayon
When adding GET requests to fetch from Google Drive, I found out about network requests blocking the OLED from updating.
I was happy to change my code and use the uasyncio lib and call it a day ... but sadly it seems that uasyncio still uses blocking requests.
I've looked into peterhinch/micropython-mqtt and his implementation of non-blocking sockets but it seems to be turned around connecting to a server and not make REST calls.
In the uasyncion repo, they talk about making non-blocking socket calls and share this and example.
https://github.com/peterhinch/micropyth ... onblock.py
I don't know how I could use the concept in a rewrite of the urequeust module.
Would you happen to know of a solution or what I could implement?
Thank you.