Skip to content

A simple IoT temperature and humidity sensor based on **ESP32-C3** and **DHT11**

License

Notifications You must be signed in to change notification settings

UDFSoft/Wifi-Temp-Sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌡️ WiFi Temperature Sensor (ESP32 + DHT11)

official page

A simple IoT temperature and humidity sensor based on ESP32-C3 and DHT11.
The device measures temperature and humidity, sends the data to a backend server, and from there it can be forwarded, for example, to a Telegram bot.

📌 Features

  • Reads temperature and humidity from the DHT11 sensor
  • Connects to Wi-Fi using WiFiManager (automatic configurator)
  • Sends data to a server via HTTPS (with X-Api-Key and X-Device-Id headers)
  • LED indicator while sending data
  • Serial Monitor logging for debugging

🛠️ Hardware

  • ESP32-C3 (ESP8266/ESP32 can also be used with minor pin adjustments)
  • DHT11 sensor (can be replaced with DHT22 for better accuracy)
  • LED indicator (LED_PIN)

⚙️ Setup

  1. Install required libraries in Arduino IDE / PlatformIO:
    • DHT sensor library
    • WiFiManager
    • WiFiClientSecure
    • HTTPClient
  2. Set your values in the code:
    #define API_KEY "your_api_key"
    #define DEVICE_ID "your_device_id"
  3. Flash the firmware to the ESP32-C3.
  4. On the first run, the device will create an access point ESP32_AP with password 12345678 — connect and configure your Wi-Fi credentials.

🚀 How it works

  1. ESP32 connects to Wi-Fi.

  2. Every 30 seconds, it reads data from the DHT11.

  3. Data is sent to the server via a POST request in JSON format:

{
 "deviceId": "xxxx-xxxx-xxxx-xxxx",
 "temperature": 24.5,
 "humidity": 55.0
}

📡 Integration example

The backend receives the data and forwards it to a Telegram bot, so you can easily check the temperature and humidity in your room.

📷 Photo (example)

<img src="IMG_20250822_192728.jpg" alt="Device preview" width="200"> <img src="IMG_20250822_192740.jpg" alt="Device preview" width="200">

🔧 Author: udfowner

About

A simple IoT temperature and humidity sensor based on **ESP32-C3** and **DHT11**

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages