Introduction: Esp8266 Team Hack Flashing MicroPython
This project is part of a series for an instructables team hack. See the series for more information.
If you received a kit for this team hack, skip this step. Your kit already has firmware as well as several files which you will use later.
These steps are written for MacOS or Linux. It is possible to do this with Windows, but that will require different software for flashing the dev board.
Download the newest MicroPython firmware. For these dev boards, the **Stable firmware, 2M or more flash** variant works well.
Install esptool which we will use to write the new firmware. This requires python 3 or newer.
pip3 install esptool esptool.py --help
Connect the esp8266 dev board to the computer via USB. This should create a new serial port device in /dev/. On my MacOS laptop, this was /dev/cu.usbserial-0001. If this doesn't make sense to you, that is ok; esptool.py may be able to auto-detect this.
Use the programmer to erase the flash. Hold down the `flash` button on the dev board, then run the following. You can release the button once you see a progress bar, or esptool.py is done.
esptool.py --chip esp8266 erase_flash
If this did not work, look for the device file in /dev/. You may need to install additional drivers if it is not there.
Now, use the programmer to write the new MicroPython firmware. Like with the previous step, hold the `flash` button and run the following, substituting the firmware file you downloaded from micropython.org.
esptool.py --chip esp8266 write_flash --flash_mode dio --flash_size detect 0x0 firmware-file.bin
This may take longer than the previous step. You can release the `flash` button when you see a progress bar.