Compare commits

..

2 Commits

Author SHA1 Message Date
Milan Toman
c833ed39aa How to upload the files 2022-08-05 12:18:05 +02:00
Milan Toman
ed288003ea Measurement done 2022-08-04 13:51:27 +02:00

View File

@@ -7,7 +7,47 @@ We need to dowload the latest MP binary. At the time of writing:
wget https://micropython.org/resources/firmware/esp8266-1m-20220618-v1.19.1.bin wget https://micropython.org/resources/firmware/esp8266-1m-20220618-v1.19.1.bin
Then, we need to flash the software to the microcontroller. A script that helps Then, we need to flash the software to the microcontroller. A script that helps
us with this task is called esptool.py which can be downloaded from [https://github.com/espressif/esptool]: us with this task is called esptool.py which can be downloaded from [HERE](https://github.com/espressif/esptool):
esptool.py --port /dev/ttyUSB0 erase_flash esptool.py --port /dev/ttyUSB0 erase_flash
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dout 0 esp8266-1m-20220618-v1.19.1.bin esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dout 0 esp8266-1m-20220618-v1.19.1.bin
esptool.py v2.4.1
Serial port /dev/ttyUSB0
Connecting......
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 80:7d:3a:7f:51:2a
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0320
Compressed 591476 bytes to 392427...
Wrote 591476 bytes (392427 compressed) at 0x00000000 in 32.3 seconds (effective 146.3 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
We need urequests as well. This is no longer the stnadard in the mikropython
default package:
https://raw.githubusercontent.com/micropython/micropython-lib/master/python-ecosys/urequests/urequests.py
Copy the files into the ESP with the help of ampy. Adafruit ampy that is.
You can get it on arch linux / Manjaro distributions with
yay -S aur/adafruit-ampy
Now the files to be copied:
ampy -p /dev/ttyUSB0 put urequests.py
ampy -p /dev/ttyUSB0 put boot.py
ampy -p /dev/ttyUSB0 put main.py
ampy -p /dev/ttyUSB0 put inet.conf
Hopefully. Done.