This code is intended to run in MicroPython on the ESP8266EX microcontroller. You may experience different results running in a different environment.
pipenv
virtual environment tool following the official documentation.From a terminal, execute the following commands:
git clone https://code.darkmorford.net/DesertBusForHope/rdp-button.git cd rdp-button pipenv install
This will create a virtual Python environment and install two essential tools: esptool, used for flashing firmware to the device, and ampy, used to manipulate the filesystem.
COM1
/dev/ttyUSB0
From this directory (the one containing Pipfile
), run the following command to clear the ESP8266's flash memory:
pipenv run esptool --port erase_flash
Flash the MicroPython firmware onto the ESP8266. This will vary slightly depending on your board.
pipenv run esptool --port --baud 460800 write_flash --flash_size detect 0 MicroPython/esp8266-20180511-v1.9.4.bin
pipenv run esptool --port --baud 460800 write_flash --flash_size detect --flash_mode dio 0 MicroPython/esp8266-20180511-v1.9.4.bin