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
- Automatic night mode (23:00–07:00): display inversion + PWM brightness dimming to 45%
- 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 .envWIFI_SSID=your_network_name
WIFI_PASS=your_password
BRIGHTNESS_DAY=80 # display brightness during day (0–100%)
BRIGHTNESS_NIGHT=45 # display brightness at night (0–100%)
NIGHT_START=22 # night mode start hour (24h)
NIGHT_END=7 # night mode end hour (24h)
GEOIP_API_URL=http://your_geoip_service_ip_or_domain:8080The .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 0x10140000cargo make flash-debugOr manually:
cargo runcargo make flash-releaseOr 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 override the automatic time-based night mode:
const FORCE_NIGHT: Option<bool> = None; // auto (time-based)
// const FORCE_NIGHT: Option<bool> = Some(true); // force night
// const FORCE_NIGHT: Option<bool> = Some(false); // force day