LED Control Using Webpage

by IoTFever in Circuits > Arduino

502 Views, 6 Favorites, 0 Comments

LED Control Using Webpage

thumbnail.jpg

ESP8266 WiFi module become very popular among hobbyists and industries for iot based projects. ESP8266 Wi-Fi transrceiver is one of the most used module for iot based application. Here, we are using ESP8266 nodemcu to connect with your Android phone. A nodemcu have inbuilt Wi-Fi shield.

In this project, we are making an "WiFi based led control from webpage using ESP8266". We can use this for home automation by connecting relay module in place of led. For controlling the led using webserver we need to create an html webpage. The page will have two button for turning led ON and OFF.

Required Hardware

nodemcu.jpg
LED.jpg
jumpper cable.jpg
Breadbourd.jpg
  • ESP8266 WiFi module
  • LED (any colour)
  • Jumper wire
  • Breadboard (optional)

Required Software

Arduino Software Link

Connecting the Hardware

  • You need wires are below
  • Connect Nodemcu D7 pin to LED positive terminal.
  • Connect Nodemcu ground pin to LED negative terminal.

Circuit Diagram

circuit logo.png

Setting Up Arduino IDE

Libraries installation.png

First we need to download the library, For that open Arduino IDE software, then click on sketch --> include library --> manage library --> and search for ESP8266WiFi.h library, and download it.

Select Board

Board installation.png
Select nodemcu.png

Next, select the board , go to Tools ==> Board ==> Search for Nodemcu 1.0(ESP-12E Module) ==> and select this board.

If you don't have ESP8266 board installed then follow the steps, Go to Tools ==> Board ==> Board manager ==> and search ESP8266 by ESP8266 community, and download the board.

Code

Download the skecth below the link , and open code , and we need to do some changes, just type your wifi ssid and wifi password.

Now , upload the source code.

Code for Project Code Link

Final Step

Serial monitor.png
SS1.png
SS2.png

After the successful upload of code then turn on your Hotspot , and wait for connecting nodemcu , open serial monitor you see message Conneting , then after conneting it will show one IP address (In your case the IP address is different, every nodemcu has different IP) , just type this IP address in your mobile browser , you will see the two button ON and OFF , by clicking on LED=ON your led will on and if clicking on LED=OFF your led will off.

and here you are finish with project , Enjoy your project.

That’s it for this tutorial. Thanks for reading.

If you have any question about today’s tutorial, please feel free to share via the comment section

I hope it will helpful to you...........................Thanks.

π˜Ώπ™€π™£'𝙩 π™›π™€π™§π™œπ™šπ™© 𝙩𝙀 π™‘π™žπ™ π™š, π™¨π™π™–π™§π™š 𝙖𝙣𝙙 𝙨π™ͺπ™—π™¨π™˜π™§π™žπ™—π™š

😍😍😍

My Another Project

ESP8266 webserver DHT11 Sensor and OLED Display

"ESP8266 webserver DHT11 Sensor and OLED Display"

My Another Project

Arduino LED cube

"Arduino LED Cube"

My Another Project

WiFi Scrolling LED Display

"Wifi Scrolling Display"