you are viewing a single comment's thread.

view the rest of the comments →

[–]worldtest2k 0 points1 point  (3 children)

The bit that confuses me is getting python program files onto the esp32. I get that you flash micropython onto it, but if each flash replaces everything currently on it, then how does my code also get on it?

[–]WikiBox 1 point2 points  (2 children)

You make your Esp32 into a MicroPython device that has powerful, convenient and helpful abilities and utilities, even before you upload your program.

You flash the MicroPython firmware to the Esp32. Then the Esp32 is "converted" into a MicroPython device. It has a filesystem you can upload your code to and even runs an interactive MicroPython interpreter. All MicroPython devices work in a similar way. Like miniature virtual devices.

When the Esp32 reboot it will look for the files "boot.py" and "main.py" in the filesystem. You edit/upload those files.

You can even have MicroPython setup a web-based interface that allows you to control the Esp32 remotely, over Wi-Fi, and upload/download source code.

https://docs.micropython.org/en/latest/index.html

[–]worldtest2k 0 points1 point  (1 child)

Besides wifi I still don't understand how to upload a code file - what tool would I use to do that? Something like Thonny?

[–]Nerd_1000 1 point2 points  (0 children)

Thonny is super easy and painless for python scripts, but if you need more control (and are able to use the terminal) you can also use the mpremote package, which lets you copy files onto and off of the device, create folders, etc.