Hey there, fellow tinkerers and weather enthusiasts! Imagine glancing at a sleek little screen on your desk that not only shows the temperature and humidity in your room but also pulls in real-time forecasts, local air quality, and—best of all—blares a warning if a thunderstorm is barreling your way. No more fumbling for your phone during a sudden downpour. That’s exactly what I built: a compact desktop weather display using an ESP32 microcontroller, a vibrant Nextion TFT touchscreen, and a smattering of sensors. Oh, and it hooks into WXAlerts.org for lightning-fast NOAA weather notifications. Let’s dive into how I made this happen—tech details included, but I’ll keep the jargon light so you can follow along without a PhD in electronics.
This project is perfect for anyone who’s ever dreamed of a customizable gadget that screams “I built that!” It’s modular too, so you can expand it into a smart home hub or even a mini dashboard for ham radio ops (shoutout to my callsign, KN4OQW). Total build time? About a weekend if you’re wiring-savvy. Cost? Under $50 if you shop smart.
What You’ll Need: The Parts List
I kept it simple—five core components that play nice together. Here’s the lineup:
| Component | Why It’s Cool | Where to Get It | Approx. Cost |
|---|---|---|---|
| ESP32 Dev Board (e.g., ESP32-WROOM-32) | The brain: WiFi-enabled microcontroller that handles all the logic and data crunching. | Amazon/AliExpress | $8 |
| Nextion 2.4″ TFT Display (NX3224T024) | Your window to the weather: A colorful, touch-enabled screen that you design GUIs for—no coding pixel-by-pixel! | Nextion official site or Amazon | $20 |
| DS3231 RTC Module | Keeps perfect time, even if your ESP32 takes a nap. Syncs with NTP over WiFi for atomic accuracy. | Amazon | $3 |
| BME680 Environmental Sensor | The senses: Measures temp, humidity, barometric pressure, and VOCs (air quality). Bosch’s little marvel. | Adafruit/SparkFun | $15 |
| Piezo Buzzer | The alarm: Beeps urgently for alerts, like a tiny tornado siren on your desk. | Amazon | $2 |
Plus, you’ll want jumper wires, a breadboard or perfboard for prototyping, and a 5V USB power supply. Tools? Soldering iron if you’re going permanent, multimeter for debugging, and the Arduino IDE on your computer.





Step 1: Wiring It Up – The Hardware Tango
Electronics assembly is like Lego for grown-ups: satisfying clicks and zero glue (usually). The ESP32 is the hub, so everything connects via its GPIO pins. I used I2C for the sensors (easy bus sharing) and UART for the Nextion display.
Here’s a quick schematic (imagine a Fritzing diagram here—I’ll upload one to the site later):
- BME680 to ESP32:
- VCC → 3.3V
- GND → GND
- SCL → GPIO 22
- SDA → GPIO 21
- DS3231 RTC to ESP32:
- VCC → 3.3V
- GND → GND
- SCL → GPIO 22 (shared I2C)
- SDA → GPIO 21 (shared)
- Nextion Display to ESP32:
- VCC → 5V
- GND → GND
- TX → GPIO 16 (RX on ESP32)
- RX → GPIO 17 (TX on ESP32)
- Piezo Buzzer to ESP32:
- Positive → GPIO 18
- Negative → GND
Pro tip: Power the Nextion from 5V for that crisp backlight, but keep the sensors on 3.3V to avoid fried pins. Test connections with a multimeter—continuity is your friend. If you’re new to this, start on a breadboard; it’s forgiving.
Step 2: Software Setup – Code That Talks to the Clouds
Time to breathe life into the hardware. I used the Arduino IDE—free, beginner-friendly, and ESP32-ready. Install the board via Boards Manager (search “ESP32” by Espressif), then grab these libraries via Library Manager:
- Adafruit BME680 (for sensor readings)
- RTClib (for the DS3231)
- Nextion library (official from Itead, or EasyNextion for simplicity)
- ArduinoJson (to parse weather APIs)
- WiFi and HTTPClient (built-in)
The code is a loop: Read sensors every 30 seconds, fetch external data, update the display, and check for alerts. Here’s the high-level flow (full sketch on GitHub soon):
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <Adafruit_BME680.h>
#include <RTClib.h>
#include <Nextion.h> // Or your preferred lib
// Pin defines and WiFi creds here...
void setup() {
Serial.begin(115200);
// Init WiFi, sensors, RTC, Nextion...
nexInit(); // Nextion handshake
}
void loop() {
// Read local sensors
if (bme.performReading()) {
float temp = bme.temperature;
float hum = bme.humidity;
// Send to Nextion: nexSendCommand("t0.txt=\"" + String(temp) + "C\"");
}
// Fetch forecast (e.g., OpenWeatherMap API – free tier!)
HTTPClient http;
http.begin("http://api.openweathermap.org/data/2.5/weather?lat=...&lon=...&appid=YOUR_KEY");
int httpCode = http.GET();
if (httpCode == 200) {
// Parse JSON, update display gauges/icons
}
// Alert check: Poll WXAlerts.org feed
http.begin("https://wxalerts.org/api/alerts?state=FL"); // Customize for your area
if (httpCode == 200 && hasAlert()) {
nexSendCommand("buzz.on=1"); // Trigger buzzer tone
nexSendCommand("alert.txt=\"STORM WARNING!\"");
tone(BUZZER_PIN, 1000, 500); // Beep!
}
delay(30000); // Chill for 30s
}
The magic? Nextion’s drag-and-drop editor (Nextion Editor software—free download). I whipped up a GUI with gauges for temp/humidity, a scrolling ticker for alerts, and touch buttons to toggle modes (local vs. forecast). Commands like t0.txt="Hello" beam data over serial—no complex graphics code needed.
For WXAlerts integration: This volunteer-run gem pulls NOAA alerts straight from satellites. I queried their API for my state’s active warnings (e.g., JSON endpoints for CAP v1.2 feeds). If an alert hits, the buzzer wails and the screen flashes red. Instant peace of mind—no app notifications to miss.
Debugging tip: Use Serial Monitor to spy on data flows. If the Nextion ghosts you, double-check baud rate (usually 9600).
Step 3: Power It On and Tweak
Upload the code, plug in USB, and watch the screen bloom to life. Calibrate the BME680 in a known environment (your AC vent for a baseline). Fine-tune the GUI for your vibe—maybe add icons for sunny days or a graph for pressure trends.
I mounted mine in a 3D-printed enclosure (Thingiverse has ESP32 cases—print one!). It sips power, so a wall wart keeps it humming 24/7.
Why This Rocks (And What’s Next)
This isn’t just a weather gadget; it’s a launchpad. The ESP32’s WiFi opens doors to MQTT for home automation, or IR blasters for controlling your thermostat based on humidity. Tie in a camera for a security cam, or expand to solar power for outdoor use. And with WXAlerts’ real-time edge—faster than most apps—you’ll never get caught in the rain again.
Tech perks? The BME680’s gas sensor flags poor air quality (hello, wildfire season), and the RTC ensures timestamps are spot-on for logging. For the public: It’s like having a mini meteorologist on your desk—fun, useful, and way cooler than a $100 off-the-shelf station.
Grab your soldering iron and give it a shot. Questions? Drop a comment below or ping me on X (@KN4OQW). Clear skies ahead!