- On PC: Install Windows Driver
Plug in the ESP and open Device Manager to make sure that the PC has proper USB to serial driver to talk to your ESP32.
- On PC: Install Python3
MicroPython runs on the ESP, but to install it on the ESP, we need to first install Python on the PC.
- On PC: Download MicroPython
Open DOS Prompt and CD to the Python scripts directory. Mine is at:
Download latest ESP 32 MicroPython bin file into this scripts directory. Detailed instructions here.
- On DOS Prompt: Erase the ESP by typing
esptool.py --chip esp32 --port COM24 erase_flash
If it keeps on trying to connect like this: "Connecting........_____....._____.." press the boot button on the ESP.
- On DOS Prompt: Install Micropython on ESP32
esptool.py --chip esp32 --port COM24 --baud 460800 write_flash -z 0x1000 "esp32-bluetooth.bin"
or for the ESP8266 Wemos D1 Mini I used:
esptool.py --port COM21 --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266-20170108-v1.8.7.bin
To start coding:
- Open DOS prompt: CD to the source code directory, then start rshell:
- Text should be yellow now. rshell does not automatically connect, so enter:
connect serial COM24
- Sync our local directory onto the ESP:
rsync simon /pyboard
Yes, the ESP32 is referred to as /pyboard. simon is PC directory to sync.
Other useful rshell commands:
- ls /pyboard
- cp pcfile /pyboard
- Once synced, type repl, CTRL-D to reboot the ESP and run main.py, or use the repl as usual. CTRL-X to exit repl back to rshell.
if you get unable to find board '' <-- it's because you have not invoke the connect serial COM24 command yet.
(in no particular order)
Ampy by AdaFruit
Rshell by Dave Hylands
uPyCraft by DFRobot
PyCharm by JetBrains
Visual Studio (Community) by Microsoft
Visual Studio Code by Microsoft
Thonny by Aivar Annamaa
ESPlorer by ???
uPyLoader by BetaRavener
SSD1306 OLED Library is no longer supported by AdaFruit, but it worked for me.
Python_LCD by dhylands
io.AdaFruit.com via MQTT by Mike Teachman