mu editor

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

mu editor

Post by OutoftheBOTS_ » Tue Nov 23, 2021 1:02 am

I am currently delivering tech education courses in a number or settings like schools, universities and council tech hubs. The courses are mainly robotics and programming and mainly for children between age 10 and 18 depending upon the course.

I want to do some micro-python stuff for high school kids on ESP32 as ESP32 is so cheap making it very affordable for me to give away the hardware at end of course for the kids to take home and keep.

I have done a little with some Adafruit boards using circuit-python and programmed using the mu editor which is a nice simple editor for kids to learn to use easily that is capable of running python live, downloading to the board and also has a serial terminal and plotter.

I am trying to use mu editor to program ESP32 board that has a wroom module at it's heart and I have installed this binary "esp32-idf3-20210202-v1.14.bin". When I start mu editor it detects micropython on esp32 connected and I can type code into the editor and hit run and it works correctly (I assume this uses put and paste mode of micropython) and I also can type in to the serial terminal at repl and it works but I am unable to download the .py file like "main.py" to the board with the mu editor.

I think it might because the ESP32 doesn't show up as external drive like the Adafruit boards did. Is there a binary for ESP32 that does mount as an external drive??

Does anyone here have experience with using mu editor on ESP32 or can suggest another IDE that would be good for teaching kids

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: mu editor

Post by scruss » Tue Nov 23, 2021 2:05 am

ESP32s (before the S2, anyway) can't do virtual drives.

I'd recommend Thonny, as it understands more types of devices than mu

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: mu editor

Post by OutoftheBOTS_ » Tue Nov 23, 2021 3:16 am

scruss wrote:
Tue Nov 23, 2021 2:05 am
ESP32s (before the S2, anyway) can't do virtual drives.

I'd recommend Thonny, as it understands more types of devices than mu
I assume that is because before the S2 ESP32 didn't have native USB. I think to have virtual drive will be much better for kids to use as having to use tools like ampy or rshell is just another complication for the kids to understand.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor

Post by pythoncoder » Tue Nov 23, 2021 9:34 am

Please see this observation about MSC mode. Pyboards retain it for compatibility reasons but it's not supported on other platforms.
Peter Hinch
Index to my micropython libraries.

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: mu editor

Post by scruss » Tue Nov 23, 2021 5:31 pm

OutoftheBOTS_ wrote:
Tue Nov 23, 2021 3:16 am
I assume that is because before the S2 ESP32 didn't have native USB. I think to have virtual drive will be much better for kids to use as having to use tools like ampy or rshell is just another complication for the kids to understand.
Yes, lack of USB capability is why it doesn't work on ESP32. But as Peter points out, it's a double-edged sword: sure, it appears easy to use, but MicroPython/CircuitPython's ability to modify the filesystem outside control of the host can cause corruption.

This is approximately every second question on the Raspberry Pi Pico forum. I used to be very pro-VCP, but am far less so now

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor

Post by pythoncoder » Thu Nov 25, 2021 10:10 am

scruss wrote:
Tue Nov 23, 2021 5:31 pm
...
This is approximately every second question on the Raspberry Pi Pico forum. I used to be very pro-VCP, but am far less so now
That is why I wrote that FAQ: answering that question here every other day was becoming tedious. MSC mode is :twisted: and experienced Pyboard users routinely disable it in boot.py. Alas there is a lobby on GitHub wanting to enable it on the Pico :(
Peter Hinch
Index to my micropython libraries.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: mu editor

Post by OutoftheBOTS_ » Thu Nov 25, 2021 11:17 pm

After trying Thorny editor it seems to be much more functional with the ESP32 Wroom module where it is quite easy to save code to the board as well as run it live and also use repl.

On the rare occasions we have to drop files that are not python scripts I suppose we will just use ampy.

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: mu editor

Post by scruss » Fri Nov 26, 2021 3:15 am

You can copy any file across using the Files pane.

And the Plotter view is solid gold. Print an array, and every column is plotted as a different trace

Post Reply