A weather dashboard for the Raspberry Pi Pico W, written in Rust using the Embassy framework. Displays current weather, hourly forecast, and multi-day forecast on a 3.5" LCD.
- Current temperature and city from online self-hosted API (via geoip service)
- Hourly temperature forecast for the current day
- 4-day weather forecast with high/low temperatures
- Real-time clock synchronized from the internet
- Three configurable display periods: day (white theme), evening (dark theme), night (dark theme, lowest brightness)
- Partial screen refresh: only redraws changed regions (time, date, weather)
- WiFi credentials loaded from
.envfile at build time
- Raspberry Pi Pico W
- Waveshare Pico-ResTouch-LCD-3.5 (ILI9488, 480x320, 16-bit parallel via SPI shift registers)
- ILI9488 Display:
- CLK:
GP10 - MOSI:
GP11 - CS:
GP9 - DC:
GP8 - RST:
GP15 - Backlight:
GP13(PWM)
- CLK:
- Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- thumbv6m-none-eabi target:
rustup target add thumbv6m-none-eabi
- probe-rs:
cargo install probe-rs --features cli
Copy the template and fill in your values:
cp .env.template .env
WIFI_SSID=your_network_name WIFI_PASS=your_password BRIGHTNESS_DAY=80 # brightness during day period (0–100%) BRIGHTNESS_EVENING=55 # brightness during evening period (0–100%) BRIGHTNESS_NIGHT=20 # brightness during night period (0–100%) EVENING_START=19 # hour when evening starts: dark theme, BRIGHTNESS_EVENING (24h) NIGHT_START=22 # hour when night starts: dark theme, BRIGHTNESS_NIGHT (24h) NIGHT_END=7 # hour when day resumes: white theme, BRIGHTNESS_DAY (24h) GEOIP_API_URL=http://your_geoip_service_ip_or_domain:8080
The three periods are:
| Period | Hours (example) | Theme | Brightness |
|---|---|---|---|
| Day | 07:00 – 19:00 | White | BRIGHTNESS_DAY |
| Evening | 19:00 – 22:00 | Dark | BRIGHTNESS_EVENING |
| Night | 22:00 – 07:00 | Dark | BRIGHTNESS_NIGHT |
The .env file is loaded automatically at build time and is gitignored.
probe-rs download cyw43-firmware/43439A0.bin --binary-format bin --chip RP2040 --base-address 0x10100000 probe-rs download cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP2040 --base-address 0x10140000
cargo make flash-debug
Or manually:
cargo run
cargo make flash-release
Or manually:
cargo build --release --no-default-features --features release probe-rs download --chip RP2040 target/thumbv6m-none-eabi/release/pico_weather_station
| Feature | Description |
|---|---|
debug |
Default. Includes defmt RTT logging, panic-probe |
release |
No logging, uses panic-reset for production |
| Task | Description |
|---|---|
flash-debug |
Build, flash and attach debug serial |
flash-release |
Build and flash release firmware |
build-debug |
Build debug only |
build-release |
Build release only |
check |
Check for compilation errors |
In src/main.rs, there is a FORCE_NIGHT constant to pin the display to a specific period without waiting for the clock:
const FORCE_NIGHT: Option<bool> = None; // auto (time-based) // const FORCE_NIGHT: Option<bool> = Some(true); // force night/evening (dark theme) // const FORCE_NIGHT: Option<bool> = Some(false); // force day (white theme)
