04 Jun Getting Started with Micro Python for ESP8266
Micro Python is nothing but a re-implementation of Python version 3 aimed at microcontrollers and embedded systems.
Installation of Python on Windows
Ensure that you have installed the latest version of Python 3.7.X on your computer. If not, follow the below instructions for Python 3.7.X installation.
- From the Python Downloads page: www.python.org/downloads Download the installation file.
- Select the desired version based on your OS. Click Download to start the installation.
- Enable the option “Add Python 3.7 to PATH” at the bottom. Click the “Install Now” button.
- Wait for a few seconds for the software to complete the installation process.
- When the installation is done, “Setup was successful” message appears and now you can close the window.
Installation of uPyCraft IDE
- Download uPyCraft IDE and install it from the link.
- A few seconds after downloading, you will see a similar file (uPyCraft_VX.exe) in your Downloads file.
- Double-click the downloaded file. A new window pops open with the uPyCraft IDE software.
Downloading and Flashing Micro Python on ESP8266
From the latest Micro Python download page, go to the ESP8266 section at the bottom to download the latest Micro Python version firmware for the ESP8266.
Note: This is only for ESP8266. If you use different board then download as per your board specification.
Serial Port in IDE:
- Connect the NodeMCU through USB or ESP8266 to your system via CP2102.
- Go to Tools, followed by Serial, and choose your ESP8266 COM port.
- Note: If you could not see your COM port, it means that you don’t have a proper driver. ESP8266-NodeMCU board makes use of CP2102 driver to download CP2102 driver. You can download the CP2102 drivers from the silicon labs website.
- After installation, restart the uPyCraft IDE and now you should be able to see the COM port in the Tools menu.
Go to Tools > Board. This tutorial is applicable only if you are using the ESP8266. So ensure that you choose the “ESP8266” option:
Flashing and Uploading Firmware:
Go to Tools > BurnFirmware menu to flash your ESP8266 with Micro Python.
Once you click the burnfire, you will get the following window.
Just Choose the Following Option
Board – esp8266
Burn-addr - 0x0
Erase_flash – yes
COM – comport number
The primary choice is Users
Firmware: Choose “Users” and select the ESP8266 .bin file that was downloaded earlier.
After clicking the “Choose” button, go to your Downloads folder and choose the ESP8266.bin file.
Once all the settings are selected, hold the “BOOT/FLASH” button in your ESP8266 board.
While holding the “BOOT/FLASH“, click the “ok” button in the burn firmware window.
Once the “EraseFlash” process begins, the “BOOT/FLASH” button can be released. After a few seconds, the firmware flashes into your ESP8266 board.
Note: If the “EraseFlash” bar is not moving and you are seeing an error message that says “erase false“, it denotes that your ESP8266 was not in flashing mode. You have to repeat all the steps mentioned earlier and hold the “BOOT/FLASH” button once again to make certain that your ESP8266 is in flashing mode.
If you still face issues regarding this topic, do not hesitate to post your queries in the Comment Box below and for more such interesting topics, follow us on 👍 Social Networks😉