IoT Tutorial #22 [ NodeMCU Tutorials #7 ]
NodeMCU ESP8266 comes with Lua firmware by default.
and if not, then you can change the firmware of NodeMCU ESP8266, steps are given in the previous post.
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
Here, I will demonstrate, how to run Lua program on NodeMCU ESP8266 for the first time.
Problem Statement:
Requirement:
1. NodeMCU ESP8266 Board
2. micro USB cable
3. LED
4. Resistor - 1k
5. Female to male relimate - 2 Nos.
6. Internet connection
NOTE: LED+ is Connected to D5 of NodeMCU ESP8266
Steps:
- Flash Fresh Lua firmware using NodeMCU Flasher (Click here to Check how) > Close Flasher
- Make below mentioned connections:
- Keep NodeMCU connected > Open ESPlorer > A new ESPlorer window will open.
"Port" must be automatically detected there. Set Baud_rate = 9600
NOTE: If PORT is not getting 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 Lua (default) firmware (shown in step 3) of previous post and then try to detect it using above steps. - Copy following code and Place it in the left black window of ESPlorer and save it with .lua extension:
- Then Click on "Send to ESP"
- LED Connected to D5 pin of NodeMCU should Blink with 1 sec delay....
For Better understanding, you can watch the demonstration video
given below:
For Better understanding, you can watch the demonstration video
given below:
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:
--------------------------------------------------------------------------------
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