How can I call a function from the PC and execute on micropython?
I found this,
viewtopic.php?f=6&t=1020&hilit=pc+control&start=10
and a few references to this,
https://github.com/dhylands/json-ipc
I have a PC side Python application that needs to control the pyboard, and it seems silly to write a wrapper for every function in pyb.
Remote calling functions on micropython
Re: Remote calling functions on micropython
That's pretty much what you need to do.
You could use pyboard.py to send python code over.
You could also send python code to be executed via eval, although this isn't generally very secure.
You could use pyboard.py to send python code over.
You could also send python code to be executed via eval, although this isn't generally very secure.
Re: Remote calling functions on micropython
Thanks Dave,
`That's pretty much what you need to do.`
Of the 3 possibilities that I mention, which one were you referring to?
I have no security requirements.
Martin
`That's pretty much what you need to do.`
Of the 3 possibilities that I mention, which one were you referring to?
I have no security requirements.
Martin
Re: Remote calling functions on micropython
All of them are basically variations on the same theme. The host has no way of directly controlling peripherals on the mivropython board. You need to send something across a link and have the micropython board actually control the peripheral.