PROJECT #8 - Trying Out Web Server On ESP32 Dev Board Using The Arduino IDE

Hello again! Welcome to, probably, my last blog about trying out ESP32 Development Board features. In this week's experiment, I'm going to try running a web server using my ESP32 Dev Board with wifi connection. If the experiment going smoothly, we should be able to see sensors reading from ESP32 Dev Board using our own device (phone or computer). Now let's get going with the experiment!


STEP 1: Prepare The Required Software and Hardware

For hardware, you'll need these components:

  • ESP32 Dev Board
  • Breadboard
  • Jumper Cable Male-to-Male
  • LED 
  • 330 Ohm Resistor
  • BMP280 Barometric Pressure Module

For software, you'll need to set up the Arduino IDE. If you haven't set it up yet, you can click here to see the installation process from my first project in the first step of the first part.

Be sure to install the correct library for the BMP280 Module too. You can see the installation here.


STEP 2: Set Up The Hardware 

Connect the BMP280 Module and LED to the ESP32 Dev Board using the jumper cable and breadboard. The hardware setup should be like in the image below.

Hardware Setup

STEP 3: Program The Dev Board

The source code I'm using is a combination from 2 projects from randomnerdtutorials. You can see both the project here and here. Look below for my source code for this project. Don't forget to put your wifi SSID and password too in the source code for your experiment.

Source Code (1)

Source Code (2)

Source Code (3)

Source Code (4)

Source Code (5)


STEP 4: Let The Experiment Begin

Run the program on the ESP32 Dev Board then open the Serial Monitor. The ESP32 should be trying to connect to your wifi. After the wifi connects, it should be displaying an IP address for you to see the web server. Copy and paste the IP address to your browser. You should be able to see your web server. Try to turn on and off the LED and see your sensors reading in the web server.

Wifi Connected and IP Address Get

Web Server View



And that's it for this (maybe) last project! Thank you for reading and keep on experimenting! ^^


- Ryu / 18220025

Comments

Popular posts from this blog

PROJECT #5 - Trying Out OLED Display and Pulse-Width Modulation On ESP32 Dev Board Using The Arduino IDE

Getting Started with ESP32 Development Board - Programming "LED Blink" using Arduino IDE