This library 'uPydevice' is basically a couple of python classes that defines a MicroPython based device (wireless or serial), so it is possible to send commands and receive its output easily. There is more info here https://github.com/Carglglz/upydevice
It is on PYPI so it can be installed with:
Code: Select all
$ pip install upydevice
Code: Select all
>>> from upydevice import W_UPYDEVICE
>>> esp32 = W_UPYDEVICE('192.168.1.56', 'mypass')
>>> esp32.cmd("uos.listdir('/')")
['boot.py', 'webrepl_cfg.py', 'main.py']
Full documentation is still on the way, but I will try to upload more examples in the next month.
Cheers.