Controlling Esp12E NodeMCU with LED from website (local network)

Teacher
Vivek Gupta
Vivek Gupta
Role : Writing free tutorials in free time
  • Website : http://vsgupta.in/
  • Experience : 5+ Years
  • Specialist in : IoT, NLP, Machine Learning, Chatbots, Voice Assistants, Hardware Engineering
Read More

CONTROLLING ESP12E NODEMCU WITH LED FROM WEBSITE (LOCAL NETWORK) – Part2

Introduction

Now, we will finally control ESP12E NODEMCU from website. We will make an HTML web app which will control the LED connected to our ESP12E Module. f you are seeing this tutorial, then I would recommend you to start from beginning here "Controlling Esp12E NodeMCU with LED from website (local network)". Else you can begin with the tutorial. So I hope that you have bill of materials ready with you. Lets start:

  1. Open your notepad++ or any code editor and create a new file.
  2. The start by pasting the below code. This is to start creating the html page

  3. Now we will create the body. Where we need one text box which will be used for the user to write the IP address of the ESP12E NODEMCU, 2 buttons for controlling each LED. One for on and other for off. So we will need total six buttons. And finally one more text box which will be used to show the activity by user. Like lights turned on, and off etc.
  4. So Now, I want it to look beautiful. So I will add the css files in script section under head tag. These settings are for alignment and colors etc.


  5. Finally add the script after body tag. This script are the functions that will called when button is pressed.
  6. Now open your webpage, and copy the ip address in the text box "xxx.xxx.x.x" and try to turn on and off the LED.
  7. Make sure that your ESP12E and the  Laptop from which you are accessing your webpage are connected to the same hotspot or wifi network.

You can watch my quick video tutorial.

Download HTML Code

I hope that you enjoyed my tutorial. Please subscribe to my youtube channel for more awesome tutorials.

Please login to get access to the quiz
CONTROLLING ESP12E NODEMCU WITH LED FROM WEBSITE (LOCAL NETWORK) – Part1 (Prev Lesson)
Back to Controlling Esp12E NodeMCU with LED from website (local network)

No Comments

Post a Reply