Install MicroPython on an Adafruit Feather HUZZAH ESP8266

Adafruit is no longer supporting CircuitPython on the ESP8266. Fortunately, MicroPython does support the ESP8266!

Unlike other boards, MicroPython isn't flashed onto the ESP8266 or ESP32 by default. That's the first thing you need to do to start programming your boards with MicroPython: flash/upload the firmware.


Getting the firmware

The first thing you need to do is download the most recent MicroPython firmware .bin file to load onto your ESP8266 device. You can download it from the MicroPython downloads page. From here, you have 3 main choices:
  • Stable firmware builds for 1024kb modules and above
  • Daily firmware builds for 1024kb modules and above
  • Daily firmware builds for 512kb modules


Install SiLabs CP210x driver

If your board has a CP210x USB to UART chip on it, be sure to first install the SiLabs CP210x driver on Windows and Mac OSX to make the board's serial port visible! (On Windows 7/8/8.1 you want the normal VCP driver, not the with Serial Enumeration driver).


Install Python if you don't have it already

Go to the Python.org download page to download the latest python and the right one for your platform.


Download esptool

When Python is installed run the following command in a terminal: pip3 install esptool


Powering the board

The Feather HUZZAH has a USB connector on it and will be powered through this when connected to your PC.
Please check if you've got a DATA usb cable, not a power only cable!


Put device in boot loader mode

The Feather HUZZAH goes automatically into boot loader mode when it detects a serial session.


Erase flash memory of ESP8266

It's recommended to erase the entire flash memory of the ESP8266 board before uploading firmware. Run the following command in a terminal to perform this erase: (This is for windows) esptool.py --port COM3 erase_flash For Linux the serial port is something like this /dev/tty.SLAB_USBtoUART This outputs something like this: esptool.py v2.7 Serial port COM3 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Features: WiFi Crystal is 26MHz MAC: 00:00:00:00:00:00 Uploading stub... Running stub... Stub running... Erasing flash (this may take a while)... Chip erase completed successfully in 7.6s Hard resetting via RTS pin...


Flashing the ESP8266

For windows in a terminal: esptool.py --port COM3 --baud 460800 write_flash --flash_size=detect 0 c:\Zz_temp\esp8266-20190529-v1.11.bin For Linux the serial port is something like this /dev/tty.SLAB_USBtoUART That gives something like this: esptool.py v2.7 Serial port COM3 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Features: WiFi Crystal is 26MHz MAC: 00:00:00:00:00:00 Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed. Configuring flash size... Auto-detected Flash size: 4MB Flash params set to 0x0040 Compressed 617880 bytes to 402086... Wrote 617880 bytes (402086 compressed) at 0x00000000 in 9.7 seconds (effective 510.1 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin... Once the tool finishes flashing the firmware (you'll usually see a blue light on the ESP8266 module flashing during this process) press the RESET button on the ESP8266 board or disconnect and reconnect it to your computer. You should be all set to start using the latest MicroPython firmware on the board!


Login via serial port

In Putty connect to the COM port and use a baudrate of 115200.
You should see something like this: MicroPython v1.11-8-g48dcbbe60 on 2019-05-29; ESP module with ESP8266 Type "help()" for more information. >>>



Getting started with MicroPython on the ESP8266