Skip to content

Latest commit

 

History

History

src

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

...

...

4. Upload the code to your ESP8266 microcontroller.👇👇👇👇👇

...

Flashing the board

We need to download the firmware for our board, I'll use the esp8266 board as an example, but this circuit will work with all micropython enabled boards. We open the browser and go to the site micropython.org/download, here we look for the firmware for the desired board. Note that there are three versions for the esp8266 here that differ in flash memory. Select the current version and download.

To install the firmware, we need a special utility, we download it as a command

pip install esptool 

Next, enter the command to clear the board's memory

esptool.py --port /dev/ttyUSB0 erase_flash

But if you get an error, then enter the following command.

sudo chmod a+rw /dev/ttyUSB0

Enter the command to flash the board. Check the port, the port speed should be 460800, if there are errors, then reduce the speed to 115200. And be sure to specify the path to the firmware file. We send the command and the board is reflashed.

esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 /your_path/esp8266-1m-20220618-v1.19.1.bin

Editor Tony

Download the editor, in which we select the port of our board and use the code from GitHub

pip3 install thonny

or

bash <(curl -s https://thonny.org/installer-for-linux)

or

sudo apt install python3-tk thonny   [On Debian/Ubuntu]
sudo dnf install thonny   [On CentOS/RHEL & Fedora]

For Windows or Mac

Open the program and first of all in the settings change python to micropython!