ESP32 Web Server
ESP32 Web Server
One of the most interesting project we can build while learning to work with a WiFi Based board is a
web Server. As we continue the journey to learn how to build projects with the ESP32, we will
examine how to build a simple web Server with the ESP32.
A Web server is essentially a device which stores, processes and delivers web pages to web clients,
which can range from browsers on our laptops to Mobile apps on our smartphones. The
communication between client and server takes place using a special protocol called Hypertext
Transfer Protocol (HTTP). The client uses an URL to make a request for a particular page and the
server responds with the content of that web page or an error message if the page is not available.
In our case, rather than responding with a specific webpage, the URL will be used to control the
state of LEDs connected to the ESP and the changes made will be updated on the webpage. For
instance, if a URL like “http://192.168.1.1/ledon” is entered in the browser, the web server will
understand its time to turn the LED “ON” and then update the status of the LED to “ON” on the
webpage. Same thing will happen when it’s required to go “OFF”.
At the end of today’s tutorial, you would know how to set up a web server on the ESP32 and connect
to it via a client (Webpage) to control its GPIO pins.
REQUIRED COMPONENTS