Sooooo much better than the switching between editor and browser. Am new to the whole micropython eco system and did not know Thonny either. Thank you for this brief and clear tutorial. will check out your channel for more.
I ran through the install script and rebooted my esp32 and I'm getting this error: ImportError: no module named 'microdot.wsgi' does anyone know how to work this out? I like the idea of webrepl but can also go the OTA route to update files.
It doesn't look like WebREPL supports that natively. I assume you want this feature because you want to update the code on your microcontroller from anywhere? One way to do this is using upagekite, although I've never tried it but it might be of use to you Bala: github.com/pagekite/upagekite
I understand ESP32 has 2 cores.. is there a way to select which UART and which CORE you want it flash? Without Thonny is there any other way to see the different scripts you have uploaded to the esp32 file-system? And what happens if you don't have a main py script.. will it just to a REPL prompt? My goal is to have one of the ESP32's core handling the REPL traffic via UART1 (I believe the default is UART0), and have the other core executing my main py script. Is that possible?
Hi Ben, great questions! I can answer to the best of my understanding: 1. Yes the ESP32 has two cores but from what I know, the MicroPython VM task is "pinned" to one core and runs only on that one. This page (forum.micropython.org/viewtopic.php?t=7776) gives context as to why that is the case. I do not know of a way around this. Also this page explains that multi-threading is quite buggy still in MicroPython (wiki.micropython.org/wiki/Threads) 2. Without Thonny, yes you can see the files on the esp32's file system. It is a simple command-line tool called "mpremote" and is well-documented here (docs.micropython.org/en/latest/reference/mpremote.html). 3. The MicroPython VM first runs boot.py, then it runs main.py. If you don't have a main.py, then yes it will go straight to REPL. 4. Changing the core and/or the UART port on which the REPL runs...I'm afraid I have no idea how to do these. Having said that, it is *rare* to have a real need to do this kind of thing. So could you explain (at a high-level) what project you are trying to do? Perhaps there is a simpler approach to solve your issue instead of this multi-core approach. Usually using asyncio is good enough for most multi-task scenarios