A portable, battery-friendly weather station built with ESP32 and DHT22, running as a Wi-Fi Access Point with a modern web interface. No internet required — connect directly to the ESP32 AP and view live data.


- Access Point Web Server
- Runs as standalone AP (default SSID:
ESP32-Weather
, password:weather123
) - AP auto-restarts if it drops (AP Guard)
- Runs as standalone AP (default SSID:
- Sensor
- DHT22 connected to GPIO 4 (configurable)
- Reads every 10 seconds
- Computes Heat Index (Steadman)
- Modern Web UI
- Responsive design (mobile + desktop)
- Large centered KPIs for Temperature, Humidity, Heat Index
- System stats: Chip, Cores, Revision, CPU MHz, Flash, Heap (in KB)
- Sensor status indicator (
ONLINE
/OFFLINE
) - Built-in Serial Monitor view with Clear button
- Robustness
- Hardware watchdog using ESP-IDF v5 API
- Non-blocking loop (
millis()
-based timers, minimaldelay
) - Periodic AP keep-alive
- Board: ESP32 (tested on LOLIN32 v1.0.0)
- Sensor: DHT22
- Connections:
- DHT22 VCC → 3.3V
- DHT22 GND → GND
- DHT22 DATA → GPIO 4 (default)
Optional: Li-Ion/Li-Po battery (many LOLIN boards support charging directly).
- Clone this repo or download the
.ino
sketch. - Open in Arduino IDE.
- Select Board:
LOLIN32
orESP32 Dev Module
. - Select correct Port.
- Upload.
(Press BOOT during upload if required by your board.) - Open Serial Monitor (115200 baud) to see simple DHT22 status logs.
- Connect to Wi-Fi AP:
- SSID:
ESP32-Weather
- Password:
weather123
- SSID:
- Open browser at http://192.168.4.1/.
- UI will display:
- Temperature, Humidity, Heat Index (large centered cards)
- System stats (chip, cores, revision, flash, heap total/free/used in KB)
- Sensor status pill
- Serial Monitor logs with Clear button