A kitchen weather station: forecast, indoor climate and smoke alarm on one LCD
This project combines nearly every helper library into one device: ESP12-WeatherStation-I2C-12864-WeatherApi-zh shows local outdoor weather and a 5-day forecast on a 128x64 LCD, reads indoor temperature/humidity from a DHT sensor, drives a smoke-alarm buzzer and LED, and optionally cycles through two additional world cities.
Reading the project as an architecture diagram
- Data layer — the WeatherAPI client fetches conditions; the DHT library reads the room.
- Display layer — u8g2 on the 12864 panel, with
WeatherDisplayHelpersmapping condition codes to icons andBootSplashBitmapdrawing the Garfield splash at boot. - System layer —
WiFiMultiConnecthandles credentials (hardcoded list or WiFiManager portal),StringHelpersbridges to the display API, and a Timezone library localises the clock. - Safety layer — smoke sensor threshold triggers
AlarmBeeperpatterns and an LED.
That is the real lesson of the project: by this point the device is mostly composition. Each piece existed, was tested, and was documented in its own repository — the new code here is just the glue and the layout.
Before you flash it
The sketch vendors its dependencies so it builds standalone, which means
you must replace placeholder values: your WeatherAPI.com key, your city, your
WiFi credentials (or enable the WiFiManager portal and configure from a phone). Every
replacement point is marked below the #include block.
Repository (README and comments in Chinese): github.com/bobhuang1/ESP12-WeatherStation-I2C-12864-WeatherApi-zh