Controlling the micropython repl from Python with PySerial

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
richardstephens
Posts: 1
Joined: Fri Aug 09, 2019 2:54 am

Controlling the micropython repl from Python with PySerial

Post by richardstephens » Mon Aug 12, 2019 9:32 am

I'd like to be able to control my Micropython's REPL from my PC.

Initially this is just going to do some trivial stuff (e.g. execute some python), but once I get the basics sorted I'd like to make a tool that automates deploying and testing of code to the pyboard.

I was able to write a few bytes to the board (visible when I manually connect to the repl), but I was not able to actually execute a statement.

User avatar
Roberthh
Posts: 1695
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Controlling the micropython repl from Python with PySerial

Post by Roberthh » Mon Aug 12, 2019 10:00 am

Look at pyboard.py in the tools directory of the repository. That offers what you need.
https://github.com/micropython/micropyt ... ster/tools

Post Reply