Skip to content
robmac21Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

WX Radar

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,lon you type.

Install

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.deb

Copy that file to any CardputerZero and install it there:

sudo apt-get install ./wx-radar_0.1.1_arm64.deb

Or 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.77

WX Radar appears on the home screen. To remove it: sudo apt-get remove wx-radar.

Use

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.

Location

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/ttyACM0 or /dev/ttyUSB0.
  • Any receiver gpsd already 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.

Settings

~/.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 9600

How it works

The 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

Data sources

  • 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=carto and a free carto_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.

Publishing to the CardputerZero AppStore

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages