ESP with DHT 11 part 2
-
DHT11: A digital sensor that measures temperature and humidity.
-
ESP32: A powerful microcontroller with built-in Wi-Fi and Bluetooth.
-
Smartphone: Used to view sensor data via a web browser or mobile app.
📡 How It Works
-
Sensor Reads Data:
-
The DHT11 periodically measures the temperature and humidity.
-
It sends this data as a digital signal to the ESP32 via a data pin.
-
-
ESP32 Processes Data:
-
The ESP32 reads the DHT11 data using a library (e.g.,
DHT.h
in Arduino). -
It then serves the data over Wi-Fi or Bluetooth.
-
-
Phone Displays Data:
-
Option 1: ESP32 runs a web server.
-
Your phone connects to the ESP32’s Wi-Fi or local network.
-
Open a browser and go to the ESP32’s IP address to see the data.
-
-
Option 2: Use Bluetooth to send data to a custom app or Bluetooth terminal.
-
✅ Simple Use Case (Web Server)
-
ESP32 creates a Wi-Fi hotspot or connects to your router.
-
It runs a web page showing temperature and humidity.
-
On your phone, connect to the same network and open a browser to see live data.
🧠Example Output:
some changes for code (compulsory):
Comments
Post a Comment