IoT Tutorial #21 [ NodeMCU Tutorials #6 ]
If your NodeMCU is not working due to any issue, not able to connect to Arduino IDE then the reason might be firmware got corrupted.
The best and the simple solution for that is to re-flash the firmware.
Recommended Internet of Things (IOT) Courses:
- Udemy: Complete Guide to Build IOT Things from Scratch to Market
- LinkedIn: IoT Foundations: Fundamentals
- edX: Introduction to the Internet of Things (IoT)
- edureka: IoT Certification Training on Azure
- Coursera: An Introduction to Programming the Internet of Things (IOT) Specialization
- Eduonix: Internet Of Things (IOT) Bundle
In this post, I have demonstrated the way to change / update the firmware of the NodeMCU ESP8266.
There are 2 firwares available for NodeMCU ESP8266:
There are 2 firwares available for NodeMCU ESP8266:
· Lua (Default Firmware) -> Supports Arduino IDE
· MicroPython -> Doesn't Support Arduino IDE (Only works with Python)
Steps to install different firmwares on NodeMCU:
1. Download following softwares:
a. ESPlorer:
https://esp8266.ru/esplorer/ > ESPlorer Downloads > Download Zip File
https://esp8266.ru/esplorer/ > ESPlorer Downloads > Download Zip File
b. NodeMCU Flasher: (Only for Windows)
https://github.com/nodemcu/nodemcu-flasher > Click on "Clone or Download"
(Lua Firmware comes with the Flasher)
https://github.com/nodemcu/nodemcu-flasher > Click on "Clone or Download"
(Lua Firmware comes with the Flasher)
c. MicroPython Firmware for NodeMCU ESP8266:
https://micropython.org/ > Download > Firmware for ESP8266 boards > Download latest .bin file
https://micropython.org/ > Download > Firmware for ESP8266 boards > Download latest .bin file
2. To check Existing firmware on NodeMCU ESP8266:
a. Connect NodeMCU to Computer (through micro USB cable)
b. Unzip Downloaded ESPlorer (From Step 1.a.). Double click on ESPlorer.jar to start
(You might need to install latest java on your Windows machine)
(You might need to install latest java on your Windows machine)
c. A new ESPlorer window will open.
"Port" must be automatically detected there. Set Baud_rate = 9600
If PORT is not getitng detected then you need to install drivers: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
> Click on "Open" to Check the firmware version of nodemcu.
> then click "RST" button on NodeMCU.
It will show the Firmware version...
Eg.
NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
NOTE:
> If some program is already uploaded on the nodeMCU then It won't detect the firmware version.
> In that case, Flash default (Lua) firware (shown in step 3) and then try to detect it using above steps.
"Port" must be automatically detected there. Set Baud_rate = 9600
If PORT is not getitng detected then you need to install drivers: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
> Click on "Open" to Check the firmware version of nodemcu.
> then click "RST" button on NodeMCU.
It will show the Firmware version...
Eg.
NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
NOTE:
> If some program is already uploaded on the nodeMCU then It won't detect the firmware version.
> In that case, Flash default (Lua) firware (shown in step 3) and then try to detect it using above steps.
For Better understanding you can watch demonstration video given below:
For Better understanding you can watch demonstration video given below:
Downloads:
Download link is given in the Description of the YouTube video shown below.
Download link is given in the Description of the YouTube video shown below.
Demonstration:
3. To flash the default (Lua) firmware on NodeMCU ESP8266: (Only on Windows)
NOTE: While FLASHING, Close ESPlorer or Arduino IDE
NOTE: While FLASHING, Close ESPlorer or Arduino IDE
a. Unzip the downloaded NodeMCU Flasher (From step 1.b.),
GO TO: modemcu-flasher-master > "Win32" or "Win64" > Release > Double Click on "EPS8266Flasher"
NOTE: If you have 64 bit OS then choose Win64 otherwise choose Win32.
GO TO: modemcu-flasher-master > "Win32" or "Win64" > Release > Double Click on "EPS8266Flasher"
NOTE: If you have 64 bit OS then choose Win64 otherwise choose Win32.
b. New "NODEMCU FIRMWARE PROGRAMMER" window will open.
i. GO TO: Config Tab > Check that It should have 1st entry as "INTERNAL://NODEMCU"
OR
GO TO: Config Tab > Click on the "Gear" icon in front of the 1st Entry.
Navigate to unzipped folder (From step 1.b.) -> Resources -> Binaries > Select the "nodemcu_integer_0.9.5_20150318.bin" file
OR
GO TO: Config Tab > Click on the "Gear" icon in front of the 1st Entry.
Navigate to unzipped folder (From step 1.b.) -> Resources -> Binaries > Select the "nodemcu_integer_0.9.5_20150318.bin" file
ii. GO TO: Operation Tab > Click on "FLASH(F)"
It might take few minutes.....
It might take few minutes.....
FIRMWARE FLASHED SUCCESSFULLY!!!
Close the window once completed.
4. To Flash the MicroPython firmware on NodeMCU ESP8266: (Only on Windows)
NOTE: While FLASHING, Close ESPlorer or Arduino IDE
a. Unzip the downloaded NodeMCU Flasher (From step 1.b.),
GO TO: modemcu-flasher-master > "Win32" or "Win64" > Release > Double Click on "EPS8266Flasher"
NOTE: If you have 64 bit OS then choose Win64, otherwise choose Win32.
GO TO: modemcu-flasher-master > "Win32" or "Win64" > Release > Double Click on "EPS8266Flasher"
NOTE: If you have 64 bit OS then choose Win64, otherwise choose Win32.
b. New "NODEMCU FIRMWARE PROGRAMMER" window will open.
i. GO TO: Config Tab > Click on the "Gear" icon in front of the 1st Entry > Select the micropython firmware .bin file (From step 1.c.)
ii. GO TO: Operation Tab > Click on "FLASH(F)"
It might take few minutes.....
It might take few minutes.....
FIRMWARE FLASHED SUCCESSFULLY!!!
Close the window once completed.
Click here to see more codes for Raspberry Pi 3 and similar Family.
&
Click here to see more codes for NodeMCU ESP8266 and similar Family.
&
Click here to see more codes for Arduino Mega (ATMega 2560) and similar Family.
Click here to see more codes for NodeMCU ESP8266 and similar Family.
&
Click here to see more codes for Arduino Mega (ATMega 2560) and similar Family.
Feel free to ask doubts in the comment section. I will try my best to solve it.
If you find this helpful by any mean like, comment and share the post.
This is the simplest way to encourage me to keep doing such work.
Thanks and Regards,
-Akshay P. Daga
Very helpful thank you
ردحذفThanks 😊
حذفSir how to connect django with python
ردحذفhow much time is expected to see the output on esptool on 115200 baudrate ??
ردحذفafter flasing Node mcu with micropython esplorer shows garbage value..