WEATHER STATION CYD

CYD 3.5" ST7796 // ESP32-WROOM-32E // AHT20+BMP280 Sensors

GPIO PINOUT

LCD DISPLAY (ST7796)

Chip SelectIO15
Data/CommandIO2
SPI ClockIO14
SPI MOSIIO13
SPI MISOIO12
ResetEN
BacklightIO27

RESISTIVE TOUCH (XPT2046)

Chip SelectIO33
InterruptIO36

I2C SENSORS (AHT20+BMP280)

SDAIO25
SCLIO32

RGB LED

RedIO22
GreenIO16
BlueIO17

BATTERY MONITOR

Battery ADCIO34
USB DetectIO35

AUDIO

EnableIO4
DAC OutputIO26

SD CARD

Chip SelectIO5
SPI ClockIO18
SPI MOSIIO23
SPI MISOIO19

OTHER

Peripheral CSIO21
Boot ButtonIO0
Serial RXIO3
Serial TXIO1

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.h configuration 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.