Microcontrollers MicroPython

MicroPython (Python 3) for ESP8266 – ESP01 (512KB)


v1.12 and earlier will work on modules with 1M or more of flash, while v1.13 requires 2M or more.

ESP8266 ESP01 (512K flash) supported by limited features.

ESP01/01s USB-UART Programmer and UART device drivers. For uploading firmware and Python REPL from the serial console

PC / Notebook (Windows/MacOS – Intel) has been installed with Python 3.x and utility program. Try this to install esptools

Thonny and Visual Studio IDE for coding editor for python

pip3 install esptool

Download Firmware

Upload lastest firmware to ESP8266 (512 KB) with utility installed on the PC/Notebook (Window/MacOS – Intel) and ESP01/01s USB-UART Programmer

This image has an empty alt attribute; its file name is USB-ESP01-PROG%20(5)-800x800.jpg
Source: Cytron Technology

Using you can erase the flash with the command (macOS): --port /dev/ttyUSB0 erase_flash

And then deploy the new firmware using and filename of the latest binary ESP8266 firmware. --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-xxxxx.bin

Using MicroPython (REPL) via USB-UART (Serial) Programmer on MacOS (Intel) screen utility

screen /dev/tty.SLAB_UART 115200

Note: Press ENTER key when the blinking cursor is on the screen without the REPL prompt.

>>> print(“Hello MicroPython”)

Blink LED (build-in) and filename


Tutorial of Thonny IDE installation (MacOS – Intel)

Troubleshooting Problem


ESP32 Microcontrollers MicroPython

Flash MicroPython Firmware

Download firmware for Generic ESP32 module


pip install esptool

Assumed the USB-Serial chip driver has been installed. Check the Operating System platform (Win/MacOS/Linux) port assignment for the attached MCU board via USB port.

On MacOS (Intel) : sudo ls -al /dev/tty.*

Erase the firmware (flash) --port /dev/tty.SLAB_USBtoUART erase_flash

Deploy the new firmware (recent downloaded esp32-xxx-xxx.bin file) to flash address 0x1000 --chip esp32 --port /dev/tty.SLAB_USBtoUART write_flash  -z 0x1000 esp32-20180511-v1.9.4.bin

Test MicroPython (REPL)

On MacOS (Intel): screen command

screen /dev/tty.SLAB_USBtoUART 1152000


Ctrl + a and Ctrl + k and y to kill the terminal session