Build an ESP8266 Based Web Server (NodeMCU)

This tutorial is a step-by-step guide that show how to build and ESP8266 server that will controls two LEDs. The ESP 8266 web server is a full mobile responsive and it can be accessed with any mobile devices.

Hi friends this is a very simple project you can do at your home without knowing any more knowledge so we will help you to build on online controlling device. For the demonstration purpose I am including two LEDs for on and off indicator. You can control any Relay by using two transistors as the switching purpose of relay.

Esp8266 web server

Because of the mobile friendly system you can easily access through the server using your mobile internet. The reason to switching options available in the ESP8266 web server first one is GPIO5 and GPE04 you can turn on and turn off as per your requirement through a single tap.

Connection of ESP8266 NodeMCU with Led

Esp8266 web server connection
Esp8266 web server connection

Properly connect the pin with resistors on the LED and a grounding is connected to the both resistor commonly. If the command will get from the web server the pins will get activated and the LED will start to light.

Uploading web server code to esp8266

NodeMCU web server programming
NodeMCU web server programming

Here I am providing the code for this project you can copy and paste into your arduino IDE software and upload the code through the cable connected to the ESP 8266 NodeMCU MCU module. Replace the ssid and password in the code while you are uploading.

Esp8266 connect to WiFi
Esp8266 connect to WiFi

Accessing web server

After uploading the court restart the ESP 8266, Open web browser and type the web address as like in the image above then you will get a new interface like two on and off buttons. Enjoy

Esp8266 web server setup
Esp8266 web server setup

Akhil Satheesh

Akhil Satheesh

Akhil Satheesh is an electronics expert and the Founder and CEO of Soldering Mind. Specializes in designing innovative electronic circuits and custom, high-performance PCB layouts. Every project he shares on solderingmind.com is rigorously bench-tested to ensure accuracy for makers and hobbyists alike.

Leave a Reply