ESP32 + uPython + uaiohttpclient

2022-11-05 作者:

Updated 2022-12-01: Let go this rough  uaiohttpclient since it’s kind too simple (just GET, no POST, and lacking almost anything needed) to be integrated to something really useful. So currently I’m using someone’s own stuff (async mod on urequests) that works – from the REPO HERE.


This is a basic test around the async http client of micropython, which is NOT built-in with the official uPy image on download page of offcial site. Anyway it can be easily installed thru the  upip  – make sure you have sufficient free RAM before the installation though, otherwise it could fail.

I somehow guess that the reason it’s not included in standard build might be… the asyncio is not quite common among the uPy developers? So people can use the built-in urequests instead.

Well I’m not an async – await Python guy on Mac/Linux either (since we’ve an powerful O/S anyway), but here I consider it might be the only method, AFAIK, to make my ESP32 nodeMCU work with kinda multi-tasking with uPy, non-preemptive, though. If not, then I’m about to be left with no choice and head back to the C stuff (with a traditional RTOS), right?

Never thought that the 1st time Python coroutine learning could be on a MCU with RAM like less than half mega. It’s overall a fantastic experience except the failure rate of the devkit board after several code update.

Perhaps it’s me who should to change the mind and lower the expectation on quality of some parts – especially the flash chip, considering its price.

It’s always a good thing to have more options, e.g. micropython, lua, which helps eliminating the barrier between rookie developers and the basic knowledge such as “rising edge”, “registers”, “datasheet” and etc, to debug on targets with limited resources like the ESP or Pi pico series.

 

原创文章,转载请注明: 转载自渔人小径

本文链接地址: ESP32 + uPython + uaiohttpclient

打赏 PayPal

文章的脚注信息由WordPress的wp-posturl插件自动生成

打赏 赞(0)
微信
支付宝
微信二维码图片

微信扫描二维码打赏

支付宝二维码图片

支付宝扫描二维码打赏

最近文章

分享

发表评论

电子邮件地址不会被公开。 必填项已用*标注