ESP32 Weather Station with OLED Display
Build a compact weather station using an ESP32, a BME280 sensor for temperature/humidity/pressure, and a 0.96" OLED display. The station reads live environmental data and displays it on screen with auto-refreshing intervals.
Components & Supplies
Circuit Connections
Overview
This project demonstrates how to wire an ESP32 to a BME280 environmental sensor and a 128×64 OLED display using the I2C protocol. The firmware reads temperature (°C), humidity (%), and barometric pressure (hPa) every 2 seconds and renders them on the OLED in a clean, formatted layout.
The BME280 is a low-power sensor by Bosch, commonly used in IoT weather projects. Combined with the ESP32's WiFi capabilities, this project can be extended to push readings to a cloud dashboard or MQTT broker.
Setup Instructions
Before uploading, install the following libraries via the Arduino Library Manager:
- Adafruit BME280 — Sensor driver
- Adafruit SSD1306 — OLED display driver
- Adafruit GFX — Graphics primitives
Select ESP32 Dev Module as your board and set the baud rate to 115200.