- download micropython image from https://micropython.org/download
- find the serial port the board is on
ls /dev/tty.*
- erase existing flash
esptool.py --port /dev/tty.wchusbserial14540 erase_flash
- write micropython image
esptool.py --port /dev/tty.wchusbserial14540 --baud 115200 write_flash --flash_size=detect 0 esp8266-20170108-v1.8.7.bin
serial bootloader for esp8266 boards https://github.com/espressif/esptool
interact with micropython board over serial https://github.com/adafruit/ampy
- tell ampy which interface to use
export AMPY_PORT=/dev/tty.wchusbserial14440
- update boot script
ampy put boot.py
- update main script
ampy put main.py