|
il y a 6 ans | |
---|---|---|
.. | ||
MicroPython | il y a 6 ans | |
Pipfile | il y a 6 ans | |
Pipfile.lock | il y a 6 ans | |
README.md | il y a 6 ans | |
boot.py | il y a 6 ans | |
config.json.tmpl | il y a 6 ans | |
main.py | il y a 6 ans |
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.git clone https://code.darkmorford.net/DesertBusForHope/rdp-button.git
cd rdp-button/code
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.
The Wemos D1 mini requires a driver for Mac OS X to drive the CH340 serial bridge. It can be downloaded here.
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 <port> erase_flash
Flash the MicroPython firmware onto the ESP8266. This will vary slightly depending on your board.
pipenv run esptool --port <port> --baud 460800 write_flash --flash_size detect 0 MicroPython/esp8266-20180511-v1.9.4.bin
pipenv run esptool --port <port> --baud 460800 write_flash --flash_size detect --flash_mode dio 0 MicroPython/esp8266-20180511-v1.9.4.bin