ESP32 + SSD1306 OLED Weather Display
ESP32 DevKit pulls weather over Wi-Fi and shows it on a 0.96" I2C OLED.
Difficulty: Through-hole. Estimated build time: about 60 minutes. Estimated parts cost: about US$12.00. 4-line bill of materials. Compare supplier offers when available. An ESP32 development board connects to a home Wi-Fi network, calls a weather API (such as OpenWeatherMap's free tier), parses the JSON response, and displays temperature and conditions on a 0.96-inch SSD1306 OLED over I2C.
Wire the OLED
Connect the SSD1306 module's VCC to the ESP32's 3.3 V pin, GND to GND, SCL to GPIO 22, and SDA to GPIO 21. These are the ESP32's default I2C pins. Most 0.96-inch OLED modules include onboard pull-up resistors on SCL and SDA, so no external pull-ups are needed.
Set up the IDE and libraries
Install the ESP32 board package in Arduino IDE (Espressif Systems, version 3.x). Install three libraries via Library Manager: Adafruit SSD1306, Adafruit GFX, and ArduinoJson by Benoit Blanchon. Confirm the OLED I2C address by uploading an I2C scanner sketch; most modules respond at 0x3C.
Connect to Wi-Fi and fetch weather
Use WiFi.begin() with your SSID and password. Once connected, use HTTPClient to make a GET request to the OpenWeatherMap current weather endpoint with your API key, city name, and units=metric. The response is a JSON document. Use ArduinoJson's deserializeJson() to extract the temperature and weather description fields.
Render on the OLED
Use the Adafruit SSD1306 library to clear the display, set cursor position, and print the temperature and condition strings. Update the display every few minutes rather than every loop iteration—the API free tier has rate limits, and hammering it will get your key suspended.
Add decoupling capacitors
Place a 100 nF ceramic capacitor on each of the ESP32 module's 3.3 V pins to GND. The ESP32's Wi-Fi radio draws surge currents that can cause brownouts if the supply is not well-decoupled. If the board resets randomly during Wi-Fi transmissions, inadequate decoupling is the most common cause.