IntermediateSensors and IoT

ESP32 Wi-Fi Weather Station

Read temperature, humidity, and pressure with a BME280, then serve a small live dashboard from the ESP32.

Estimated time: 2–3 hours Ā· Skills: I²C, Wi-Fi credentials, HTTP server, sensor libraries

Parts from the database

Other supplies

Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.

Connections

  1. BME280 VIN to 3V3, GND to GND, SDA to GPIO 21 and SCL to GPIO 22 on a classic ESP32 DevKit.
  2. If using SSD1306 too, connect its SDA/SCL to the same bus; verify the two devices have different I²C addresses.
  3. Do not connect 5 V pull-ups to ESP32 I/O.

Build steps

  1. Install Adafruit BME280 and Unified Sensor libraries; test the sensor example over USB first.
  2. Set the sensor address (usually 0x76 or 0x77) based on the breakout's SDO jumper.
  3. Add Wi-Fi credentials locally in the sketch and start the ESP32 web server.
  4. Open the displayed local IP address on a device on the same network; refresh and compare with the serial output.

Software and firmware setup

Firmware is required, but a complete combined web-server sketch is not included yet. Bring up the BME280 readout on the ESP32 first, then add a local web-server handler that reports the latest readings. Keep Wi-Fi credentials in a local, uncommitted copy of the sketch.

Test your build

The page should show live sensor readings and refresh without requiring a cloud account. Expect indoor pressure/weather trends, not a certified forecast.

Troubleshooting

  • If begin() fails, try address 0x76 then 0x77 and check the module label.
  • If the ESP32 never joins Wi-Fi, verify 2.4 GHz network support and the SSID/password.
  • If the browser cannot load the page, confirm the phone/computer is on the same local network.

Safety and limitations

Use a 3.3 V-compatible sensor breakout and keep Wi-Fi credentials out of public source code. Do not treat hobby readings as weather warnings.

Manufacturer and platform documentation

Community Notes for This Project

These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.

Set up the comments service to load community notes.

Share a tip or question about this build

← Browse all projects