No description
  • Python 82.3%
  • Just 17.7%
Find a file
2026-10-21 11:20:38 -07:00
.github 🐛 Fix Dependabot auto-merge: drop --auto (no branch protection) (#15) 2026-10-11 08:09:25 -07:00
.gitignore 🔧 Modernize to uv and pyproject.toml 2026-06-06 13:42:50 -07:00
justfile ✅ Add prek pre-commit hooks 2026-10-11 08:01:04 -07:00
prek.toml 🔧 Use native prek.toml and harden Dependabot workflow 2026-10-11 08:03:32 -07:00
program.py ♻️ Fetch each NHL endpoint once per run 2026-06-06 14:09:43 -07:00
pyproject.toml ✅ Add prek pre-commit hooks 2026-10-11 08:01:04 -07:00
README.md 🐛 Fix sense-hat install on Raspberry Pi 2026-06-06 13:47:09 -07:00
uv.lock ⬆️ upgrade depenedencies 2026-10-21 11:20:38 -07:00

rpi-kings

This script runs on a Raspberry Pi with a Sense HAT attached and scrolls upcoming Seattle Kraken (SEA) game info across the LED matrix when a game is about to start.

Requirements

  • A Raspberry Pi with a Sense HAT.
  • Raspberry Pi OS Bookworm (Python 3.11).
  • uv for dependency management.
  • just (optional) for the helper recipes.

Setup on the Raspberry Pi

The sense_hat Python package and its RTIMU C extension are not on PyPI; they ship with Raspberry Pi OS via apt and are built against the system Python. The project venv must therefore (a) use the system Python 3.11 and (b) be created with --system-site-packages so the apt-installed modules are visible.

The setup-pi recipe does both:

just setup-pi

Or manually:

sudo apt install sense-hat        # installs sense-hat + python3-rtimulib
rm -rf .venv
uv venv --system-site-packages --python 3.11
uv sync

Setup on a dev machine (no Sense HAT)

uv sync

program.py won't run without the Sense HAT, but linting and lockfile maintenance work fine.

Running

just run
# or, without just:
uv run python program.py

The script checks the NHL schedule for the configured team (SEA) and, if a game is starting within the next 10 minutes, scrolls a summary across the Sense HAT.

Development

just lint           # ruff check
just lock           # refresh uv.lock
just upgrade        # refresh uv.lock with upgraded versions