Page 1 of 2
Controlling micropython board from desktop computer
Posted: Sun Apr 10, 2022 1:55 pm
by Marius
I want to control a micropython rp2040 board from my desktop computer. Are there any good write ups for how to do this with pyserial or anything else?
Re: Controlling micropython board from desktop computer
Posted: Sun Apr 10, 2022 4:18 pm
by tepalia02
Not sure. But this one may help if you're using a windows PC:
https://picockpit.com/raspberry-pi/rasp ... n-windows/
Re: Controlling micropython board from desktop computer
Posted: Sun Apr 10, 2022 7:40 pm
by BetterAutomations
What kind of control specifically are you looking to do? What's the goal?
Re: Controlling micropython board from desktop computer
Posted: Mon Apr 11, 2022 12:53 pm
by andypiper
I'm also curious what you mean by "control" here - are you looking to send serial commands, turn attached devices on/off?
Also, what kind of desktop computer are you using?
Re: Controlling micropython board from desktop computer
Posted: Wed Apr 13, 2022 7:20 am
by Nicolett
maybe he was talking about a built in compilator? like arduino has one
Re: Controlling micropython board from desktop computer
Posted: Wed Apr 13, 2022 7:42 am
by Roberthh
AFAIK, there is no built-in compiler in the Arduino IDE itself. Arduino packages for a certain architecture install the respective compiler when the package is installed. The Arduino IDE then calls this compiler/linker.
Re: Controlling micropython board from desktop computer
Posted: Thu Jul 07, 2022 4:10 pm
by Marius

- IMG_20220707_180529(2).jpg (161.89 KiB) Viewed 7811 times
Let me explain. This is my BOB BOB BOBS MOTHER BOARD. Its a RP2040 board for holding a Trinamic TMC5160 BOB(break out board).
I can control the TMC5160 board via the micropython repl. But i want to control it from some python3 code i run on my desktop. With pyserial or whatever. My desktop can be apple, win, ubuntu.
Re: Controlling micropython board from desktop computer
Posted: Thu Jul 07, 2022 6:25 pm
by BetterAutomations
Rather open-ended question without knowing what it is you would do when controlling it (such as turning on a lamp) but one way to do it is send serial commands from the desktop. The uPy script listens with input() as though it were typed directly into the script, and outputs lines that are parsed on the desktop. Use new lines to delineate output.
https://pyserial.readthedocs.io/en/late ... intro.html
Re: Controlling micropython board from desktop computer
Posted: Thu Jul 07, 2022 8:02 pm
by scruss
Maybe the OP's looking for something equivalent to
Firmata, the serial remote protocol much used in interaction design? I don't know of any written-in-MicroPython implementations of Firmata, or any that could talk to a Trinamic board (stepper driver?)
Re: Controlling micropython board from desktop computer
Posted: Thu Jul 07, 2022 8:11 pm
by BetterAutomations
scruss wrote: ↑Thu Jul 07, 2022 8:02 pm
Maybe the OP's looking for something equivalent to
Firmata, the serial remote protocol much used in interaction design? I don't know of any written-in-MicroPython implementations of Firmata, or any that could talk to a Trinamic board (stepper driver?)
Firmata would be a great choice. I don’t think the Pi board needs to run uPy, they probably have an image just for that.