Announcing MPyControl - control MicroPhython with your own code
Announcing MPyControl - control MicroPhython with your own code
hiya,
i developed a small tool for automating the work with my esp32/esp8266 board in the sense of eg. sending cntrl+c or a machine reset to the board, follow the output over serial etc.etc.
it can be used in own code as well as from the cmd line
https://pypi.org/project/mpycntrl/
any feedback welcome. (guess there are still some bugs inside)
hope you like it
i developed a small tool for automating the work with my esp32/esp8266 board in the sense of eg. sending cntrl+c or a machine reset to the board, follow the output over serial etc.etc.
it can be used in own code as well as from the cmd line
https://pypi.org/project/mpycntrl/
any feedback welcome. (guess there are still some bugs inside)
hope you like it
Re: Announcing MPyControl - control MicroPhython with your own code
Hi, I'm glad someone else is working on this
see viewtopic.php?f=15&t=7120#p40515 and this viewtopic.php?f=15&t=6808
I like the fact that the serial interface requires just Pyserial (I use Picocom also, but sadly the latest version is not available for Raspbian)
Also I would like to mention that there is an official tool pyboard.py (which is recently (I think?) documented in the official docs, and therefore a bit unknown in my opinion)
I guess in the future MicroPython should have an 'unified' command line tool (Serial and WebREPL/BleREPL/Wireless_REPL) + Python library to interface/control MicroPython.
So any piece of work in this direction should be welcome.
see viewtopic.php?f=15&t=7120#p40515 and this viewtopic.php?f=15&t=6808
I like the fact that the serial interface requires just Pyserial (I use Picocom also, but sadly the latest version is not available for Raspbian)
Also I would like to mention that there is an official tool pyboard.py (which is recently (I think?) documented in the official docs, and therefore a bit unknown in my opinion)
I guess in the future MicroPython should have an 'unified' command line tool (Serial and WebREPL/BleREPL/Wireless_REPL) + Python library to interface/control MicroPython.
So any piece of work in this direction should be welcome.
Re: Announcing MPyControl - control MicroPhython with your own code
Yes this documentation was added this week. Sorry it's been long overdue. But pyboard.py is an official part of MicroPython, and a potentially useful building block for writing automation and scripting tools for MicroPython.
Re: Announcing MPyControl - control MicroPhython with your own code
docu !!! good that it is now in place !
haven't seen that before ...
probably i skiped it because of the name (i use esp boards... not pyboard...)
ok, then i sending my tool for retiring
yesterday evening i spent some efforts on webrepl and a small websockets prototype.
will kick that too... (will check the pyboard tool lateron)
haven't seen that before ...
probably i skiped it because of the name (i use esp boards... not pyboard...)
ok, then i sending my tool for retiring
yesterday evening i spent some efforts on webrepl and a small websockets prototype.
will kick that too... (will check the pyboard tool lateron)
Re: Announcing MPyControl - control MicroPhython with your own code
btw regarding docu and webrepl
https://docs.micropython.org/en/latest/ ... /repl.html
refering last line on the page
"Note that ctrl-A and ctrl-D do not work with WebREPL."
cntrl+A ... this works by the way... (cntrl+d on blank line resets the socket)
have done it yesterday with my websocket prototype.
webrepl as such (https://micropython.org/webrepl/?) has stoppped working
dont know if its just on my laptop (and network) or a generell problem...
https://docs.micropython.org/en/latest/ ... /repl.html
refering last line on the page
"Note that ctrl-A and ctrl-D do not work with WebREPL."
cntrl+A ... this works by the way... (cntrl+d on blank line resets the socket)
have done it yesterday with my websocket prototype.
webrepl as such (https://micropython.org/webrepl/?) has stoppped working
dont know if its just on my laptop (and network) or a generell problem...
Re: Announcing MPyControl - control MicroPhython with your own code
I try to use your project to sync local files to device via USB (in the same way as my OTA stuff: compare size and hash and update only changed/missing files) ... WIP: https://github.com/jedie/micropython-so ... a49e3ecd94
But i ran into a problem sending files: https://github.com/kr-g/mpycntrl/issues/1
But i ran into a problem sending files: https://github.com/kr-g/mpycntrl/issues/1
Re: Announcing MPyControl - control MicroPhython with your own code
Hi kr-g, I did not mean that you should stop working on those projects , as I said, any piece of work in this direction should be welcome.kr-g wrote: ↑Fri Dec 06, 2019 8:08 amdocu !!! good that it is now in place !
haven't seen that before ...
probably i skiped it because of the name (i use esp boards... not pyboard...)
ok, then i sending my tool for retiring
yesterday evening i spent some efforts on webrepl and a small websockets prototype.
will kick that too... (will check the pyboard tool lateron)
I just wanted to point out that there is already some work that have been done, so you may want to try it out before "reinventing the wheel" and see if it is good enough for your needs and/or meet your expectations. If that is not the case then you may want to contribute to those projects if you see or find any possible improvements.
If you still decide to start from zero that's okey too because you may find a new approach or solution that works better than any existing project and even if it does not, you will learn a lot from the process.
Thanks for the confirmation jimmo, I had to double check the docs before posting the first message because I did know about pyboard.py but I didn't know if it was already documented.
And yes, I would like point out that some of the most known projects/tools which are based on this "building block" are rshell, ampy or mpfshell, so they may be taken as an example for future work also.
Re: Announcing MPyControl - control MicroPhython with your own code
anything better than sudoku in the evening ...
Re: Announcing MPyControl - control MicroPhython with your own code
i just closed the issue.jedie wrote: ↑Fri Dec 06, 2019 8:20 pmI try to use your project to sync local files to device via USB (in the same way as my OTA stuff: compare size and hash and update only changed/missing files) ... WIP: https://github.com/jedie/micropython-so ... a49e3ecd94
But i ran into a problem sending files: https://github.com/kr-g/mpycntrl/issues/1
please check out the latest version with pttydev (experimental threaded reader)
should give also better performance (hopefully)
Re: Announcing MPyControl - control MicroPhython with your own code
to whom it may concern
regarding pttydev https://github.com/kr-g/pttydev and mpycntrl
there is an open issue regarding the limitation of webrepl on github https://github.com/micropython/micropython/issues/2497
regarding pttydev https://github.com/kr-g/pttydev and mpycntrl
there is an open issue regarding the limitation of webrepl on github https://github.com/micropython/micropython/issues/2497