Cyber Chasse- Micro Python For ESP8266

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. 
 

  1. From the Python Downloads page: www.python.org/downloads Download the installation file. 
  1. Select the desired version based on your OS. Click Download to start the installation. 
  1. Enable the option “Add Python 3.7 to PATH” at the bottom. Click the “Install Now” button. 
Micro Python
  1. Wait for a few seconds for the software to complete the installation process. 
Micro Python
  1. When the installation is done, “Setup was successful” message appears and now you can close the window. 

Installation of uPyCraft IDE 

  1. Download uPyCraft IDE and install it from the link
  1. A few seconds after downloading, you will see a similar file (uPyCraft_VX.exe) in your Downloads file. 
  1. Double-click the downloaded file. A new window pops open with the uPyCraft IDE software. 
Micro Python

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.  

Micro Python

 
Note: This is only for ESP8266. If you use different board then download as per your board specification. 
 
Serial Port in IDE: 
 

  1. Connect the NodeMCU through USB or ESP8266 to your system via CP2102.   
  1. Go to Tools, followed by Serial, and choose your ESP8266 COM port. 
Micro Python for ESP8266
  1. 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
  1. After installation, restart the uPyCraft IDE and now you should be able to see the COM port in the Tools menu. 

Select board: 
Go to Tools > Board. This tutorial is applicable only if you are using the ESP8266. So ensure that you choose the “ESP8266” option: 

Micro Python for ESP8266

 
Flashing and Uploading Firmware: 
Go to Tools > BurnFirmwaremenu to flash your ESP8266 with Micro Python. 

Micro Python for ESP8266

 
Once you click the burnfire, you will get the following window. 

Micro Python for ESP8266

 
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. 

Micro Python for ESP8266

 
Once the “EraseFlash” process begins, the “BOOT/FLASH” button can be released. After a few seconds, the firmware flashes into your ESP8266 board. 

Micro Python for ESP8266

 
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😉