mu-editor / mu

A small, simple editor for beginner Python programmers. Written in Python and Qt5.
http://codewith.mu
GNU General Public License v3.0
1.39k stars 433 forks source link

Implement handshake on serial communication for ESP devices #2433

Open paulvanharen opened 1 year ago

paulvanharen commented 1 year ago

I ran a classroom using Mu and many ESP devices. In the classroom were about 40 students with different laptops. Running code was troublesome. The behavior when using the RUN button was flaky, and dependent on the precise laptop. Hitting RUN and RUN again gave different results.

What happens is the following:

Inspired by the mpremote tool I implemented a handshake on the serial port for the RUN command.

This works fine in my environment; it provides a robust solution. Please note, the testing has been limited. Glancing through the issues mentioned here at Github, the following issues appear to be similar and may be affected (solved?): #2397, #2319, #1996 and #1433. Unfortunately, I have no means to verify the last claim.

satmandu commented 1 month ago

@ntoll Do you know who needs to be pinged to get some of these PRs reviewed?