Installing MicroPython on a ESP-32


An excellent reference is the official MicroPython one here.

Install CP210x drivers Find out COM port (in this case COM3) –chip esp32 –port COM3 erase_flash wget Note that this is now an old firmware –chip esp32 –port COM3 write_flash -z 0x1000 esp32-20180511-v1.9.4.bin Putty over serial to COM3 with baud rate 115200 import webrepl_setup On flash, the AP mode was not enabled import network sta_if = network.WLAN(network.STA_IF) sta_if.connect(‘Brave-Fiber-Ruckus’, ‘braveGl0bal’) Leave putty open, or else all this will be undone Load up a webrepl - Hosted - or self-hosted Connect via WebREPL Download from the device and update it with the following lines:

import webrepl import network

webrepl.start() sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print(‘connecting to network…’) # Note that your WiFi details will be different sta_if.connect(‘WiFi SSID’, ‘password’) while not sta_if.isconnected(): pass print(‘network config:‘, sta_if.ifconfig()) Send the updated file back to device.

Now you can close Putty, reboot the device and it will immediately be on the network.

Two image files:

-rw-rw-r– 1 wookie wookie 70128 Dec 12 17:25 esp32-devboard-pinout.jpeg -rw-rw-r– 1 wookie wookie 101697 Dec 12 17:25 esp32-devkit-v1.jpeg

Andrew B. Collier
Entrepreneur / Data Scientist