Random Nerd Tutorials

ESP32 Web Server – Arduino IDE


In this project you’ll create a standalone web server with an ESP32 that can toggle two LEDs using the Arduino IDE programming environment. If you want to learn more about the ESP32 dev board, read my Getting Started Guide with ESP32

First, watch the video demonstration below

Preparing the ESP32 board in Arduino IDE

There’s an add-on for the Arduino IDE that allows you to program the ESP32 using the Arduino IDE and its programming language. Follow this tutorial to prepare your Arduino IDE:

Uploading the code

In this example, you’re going to connect two LEDs to the ESP32 that can be controlled remotely through a browser.

Copy the following code to your Arduino IDE to upload it to your ESP32 Dev Module.

Don’t forget to add your network credentials in the preceding code (SSID and Password).

Plug your ESP32 Dev Module to your computer and follow these next instructions:

1) Select your board in Tools > Board menu (in my case it’s the ESP32 Dev Module)

2) Select the COM port

3) To make your ESP32 go into downloading/uploading mode: hold the BOOT button and press the EN button to reboot your ESP32

4) Press the Upload button in the Arduino IDE and wait a few seconds while the code compiles and uploads to your board. If everything is correct this what you should see:

5) Restart your ESP32 to run the newly uploaded code

Parts required and schematics

Here’s the needed parts for this example:

You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!

Assemble all the parts as in the schematics below.

Accessing your web server

When your ESP32 restarts, it prints in your Arduino IDE serial monitor the IP address of your ESP32 (set the baud rate to 115200).

You can access your web server, if you type your ESP32 IP address in your browser. In my case it’s


You can easily toggle the two LEDs connected to your ESP32 on and off. For a video demonstration of this project make sure you watch the video above in the introduction of this post.

Do you have any questions? Leave a comment down below!

Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog.

Learn ESP32 with Arduino IDE

This our complete guide to program the ESP32 with Arduino IDE, including projects, tips, and tricks! The registration closes soon, so SIGN UP NOW »

Recommended Resources

Home Automation using ESP8266 »
Build IoT projects and home automation gadgets with the ESP8266 Wi-Fi module.

Build a Home Automation System »
Learn how to build a automation system using open-source hardware and software from scratch.

Arduino Step-by-Step Projects »
Build 25 cool Arduino projects with our couse even with no prior experience!

Leave a Comment:

Add Your Reply

⏰ Registrations are open ⏰
Sign up for "Learn ESP32 with Arduino IDE" Course