Animated weather radar and a 3-day forecast on an M5Stack CardputerZero running Gh0st OS. No accounts and no API keys.
- Radar: the last 1–2 hours of rain and snow as a loop, over a dark map, centred on you. Full screen, refreshed every 10 minutes.
- 3-day forecast on Tab: now (temperature, feels-like, wind, humidity) and the next three days' highs, lows and chance of rain.
- Location from a GPS receiver, or a city, ZIP code or
lat,lonyou type.
Build on a Mac or Linux computer (or WSL on Windows) with Rust installed.
Make the .deb:
sh build-deb.sh # -> dist/wx-radar_<version>_arm64.debCopy that file to any CardputerZero and install it there:
sudo apt-get install ./wx-radar_0.1.1_arm64.debOr build and install in one step over SSH (turn on Settings > SSH on the CardputerZero first):
CARDPUTER_USER=yourname sh install.sh 192.168.1.77WX Radar appears on the home screen. To remove it:
sudo apt-get remove wx-radar.
| Key | Does |
|---|---|
| Tab or 5 | Radar ↔ 3-day forecast |
| Space or 6 | Pause / play the loop |
| ← / → (Fn+Z / Fn+C) | Step through frames (pauses) |
| ↑ / ↓ (Fn+F / Fn+X) | Zoom in / out (continent to local) |
| R or 7 | Reload now |
| L | Set location (city, ZIP or lat,lon) |
| G | Use GPS |
| U | °F / °C |
| 8 | Menu |
The ticks under the top strip show where the loop is; the newest frame is on the right and holds a moment before the loop starts again. The dot in the middle is you.
On first launch WX Radar looks for a GPS. With none, press L and type
where you are: Boston, MA, 19103, Paris, France, or 40.71,-74.01.
Picking a place stops the GPS search; G turns it back on.
GPS receivers that work:
- M5Stack Cap LoRa868 / Cap LoRa-1262 on the top header. The app turns
on the header's 5 V while it looks for a fix and reads the GPS on
/dev/ttyS0(GPIO14/15) at 115200. Power the Cardputer off before fitting or removing a Cap. Its first fix after power-up is a cold start: 30 s or more, longer indoors. - Anything that shows up as a serial port speaking NMEA: most USB GPS
dongles (u-blox 7/8 sticks) appear as
/dev/ttyACM0or/dev/ttyUSB0. - Any receiver
gpsdalready runs.
If the app says it has no permission to read the port:
sudo usermod -aG dialout $USER, then reboot. A GPS needs sky: by a window
or outside.
~/.local/share/wx-radar/radar.conf:
source=gps # gps | place
zoom=6 # 3 continent … 7 local
frames=10 # 2–13 frames in the loop, 10 minutes apart
speed_ms=500 # time per frame
celsius=0 # 1 = °C and km/h
map=osm # osm (no key) | carto (needs carto_key)
carto_key= # free key from carto.com/basemaps/apikey
gps_device= # empty = try gpsd, USB, then the Cap (ttyS0)
gps_baud=0 # 0 = try 115200 (Caps) and 9600The same binary runs as the app and as a short-lived helper
(--radar, --forecast, --geocode, --locate) that does the network work
in the background with curl, then has ffmpeg stitch the map and radar
tiles into 320×170 RGB565 frames, cached in
~/.local/share/wx-radar/cache. The app just blits them, so the loop
costs almost nothing. Past frames never change, so a refresh only downloads
the newest one.
You can run the helper from the Gh0st terminal:
wx-radar --geocode "Boston, MA"
wx-radar --forecast 42.36 -71.06 f
wx-radar --locate- Radar: RainViewer public API (free for personal use; 10-minute frames, zoom up to 7).
- Map: © OpenStreetMap
contributors, from OpenStreetMap's own tile server, darkened by the app.
With
map=cartoand a freecarto_key, CARTO's Dark Matter instead (CARTO tiles without a key carry an "API key required" watermark). - Forecast and place search: Open-Meteo (CC BY 4.0); backup forecast for US places from the National Weather Service; US ZIP codes from Zippopotam.us.
- GPS place names: OpenStreetMap Nominatim.
Same as Tablo Zero: python3 packaging/set_author.py <github-username> "<Your Name>",
put two 320×170 screenshots in screenshots/ as radar.png and
forecast.png (screenshot key on the device; they land in
~/Pictures/Screenshots), push this folder to
github.com/<you>/wx-radar, then sh publish.sh.