So Easy MicroPython - MCU Firmware Update
by Yungger Chen in Circuits > Microcontrollers
489 Views, 1 Favorites, 0 Comments
So Easy MicroPython - MCU Firmware Update
Upload MicroPython firmware to MCU using NodeMCU PyFlasher
Download MicroPython Firmware
Go to [MicroPython Download] page, and choose your MCU module, for instance ESP8266 or ESP32.
Select either one of the latest version of "Firmware with ESP-IDF v?.x" (eg. v1.14)
- Generic ESP8266 module: esp8266-20210202-v1.14.bin (elf, map) (latest)
- Generic ESP32 module: esp32-idf3-20210202-v1.14.bin for ESP-IDF v3.x 或 v4.0
Download ModeMCU Flasher
Download one of NodeMCU Flasher:
- Windows: NodeMCU-PyFlasher.exe
- MacOS: NodeMCU-PyFlasher.dmg
Flash New MicroPython Firmware
Config the Flash NodeMCU setting for you MCU:
- Serial Port: where the MCU plug-in
- 'Firmware: the .bin file downloaded
- Erase flash: Yes
Click on "Flash NodeMCU" button to start erase and upload the firmware.
When console display "Firmware successfully flashed", pressing the RST button of the MCU or Replug-in it.
Test MicroPython Code
Save the MicroPython codes as main.py and upload it to the MCU。
import utime
from machine import Pin
led = Pin(2, Pin.OUT)
for _ in range(5):
led.value(0)
utime.sleep(0.5)
led.value(1)
utime.sleep(0.5)
No surprise, the built-in LED will start to blink for 5 times automatically, meaning the MCU is now MicroPython compatible already。
If LED didn't blink, you may try to press the RST button of the MCU, it should be OK without any doubt。
*** If you have no idea how to do it, read my another article "So Easy MicroPython - ESP8266/ESP32 MCU File Management" first.
That's So Easy, Hope to Help a Little Bit !
Posted by Yungger
If it help you, and want to give some encouragement, just go HERE 😘 😘 !!