WEATHER STATION CYD
CYD 3.5" ST7796 // ESP32-WROOM-32E // AHT20+BMP280 Sensors
GPIO PINOUT
LCD DISPLAY (ST7796)
| Chip Select | IO15 |
| Data/Command | IO2 |
| SPI Clock | IO14 |
| SPI MOSI | IO13 |
| SPI MISO | IO12 |
| Reset | EN |
| Backlight | IO27 |
RESISTIVE TOUCH (XPT2046)
| Chip Select | IO33 |
| Interrupt | IO36 |
I2C SENSORS (AHT20+BMP280)
| SDA | IO25 |
| SCL | IO32 |
RGB LED
| Red | IO22 |
| Green | IO16 |
| Blue | IO17 |
BATTERY MONITOR
| Battery ADC | IO34 |
| USB Detect | IO35 |
AUDIO
| Enable | IO4 |
| DAC Output | IO26 |
SD CARD
| Chip Select | IO5 |
| SPI Clock | IO18 |
| SPI MOSI | IO23 |
| SPI MISO | IO19 |
OTHER
| Peripheral CS | IO21 |
| Boot Button | IO0 |
| Serial RX | IO3 |
| Serial TX | IO1 |
SPECIFICATIONS
Display
3.5" TFT 320x480
Driver
ST7796
MCU
ESP32-WROOM-32E
Touch
XPT2046 Resistive
Indoor Sensor
AHT20 + BMP280
Weather API
OpenWeatherMap
Power Input
5V USB Type-C
Battery
3.7V LiPo Supported
IMPORTANT NOTES
- TFT_eSPI Library: Requires custom
User_Setup.hconfiguration for ST7796 CYD. See the code page for the complete setup file. - Display SPI: Uses HSPI bus (MOSI=13, SCLK=14, CS=15, DC=2).
- I2C Sensors: AHT20 for temperature/humidity, BMP280 for pressure. Connected to SDA=25, SCL=32.
- RGB LED: Common anode (active LOW). Use
analogWrite(pin, 255-value)for brightness. - Weather Effects: RGB LED shows lightning flashes during thunderstorms, breathing blue for rain.
- Web Interface: Async web server on port 80. The v7.0 dashboard adds a barometer trend from the BMP280, dew point, air quality, an 8-hour temperature graph, and live NWS weather alerts fetched by the browser.
- 5-Day Forecast: Scrolling forecast display with weather icons, bucketed by real calendar days. Weather refreshes every 20 minutes.
- Secrets in config.h: WiFi, OpenWeatherMap key, FTP credentials, and location all live in
config.h— the code page publishes a placeholder template, put in your own values. - Arduino IDE Settings: Board: ESP32 Dev Module, PSRAM: Disabled, Flash Mode: DIO, Partition Scheme: Huge APP.