Uploading code via Python script tips?
-
Hi All,
I'm planning on making a python based GUI for my product. One of the features I want to implement is to update code on the Pycom. The Device will be connected via USB. Anyone have any pointers on how to do this? Any suggestions on where to start looking will be greatly appreciated.
Thanks,
Troy
-
Hi Troy
Pyserial I believe can be run in python script. Could you not use your python script to execute terminal commands like rshell?
Yours
Matt
-
Thanks @Matthew-Felgate-0
Thanks for the pointer. researching this definitely helped me understand the process more. While this solution would work via terminal commands, I don't think it would work via a python script running on my computer. I'm still looking into it.
Much appreciated.
Troy
-
Hi Troy
Pycom boards are best managed through the Visual Studio Pymakr extension and Pybytes deployments online: https://docs.pycom.io/pybytes/releases/deploy/ (we are working on API access to pybytes at the moment)
However in Python you could use Pyserial to interface with the board over USB: https://pyserial.readthedocs.io/en/latest/shortintro.html
And you could use rshell for uploading and downloading files: https://github.com/dhylands/rshell
Let me know if this helps you.
Matt