Skip to content
This repository was archived by the owner on Oct 28, 2026. It is now read-only.

car_cluster: an electric car's cluster at 800x480, drawn to the neon dial look - #237

Merged
bdbarnett merged 1 commit into
mainfrom
car-cluster-ev
Oct 23, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
car-cluster-ev

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

Rewrites the car cluster example as a two-dial EV cluster at 800x480: speed (mph) and motor power (kW) as neon rings with the odometer and mi/kWh under them, a status line, turn indicators, a lit lane with the car's marker, and P R N D S. The car drives itself round a 90 second loop; Left/Right hold a turn signal, Enter pauses.

The rings are canvas art (a colour sweep of short arc segments, ticks, a hairline) with three cheap moving parts: a cover arc for the empty track, a blurred glow, and a cap on the leading edge. No image assets.

Verified: headless CPython captures at 14 s and 50 s (docs/screenshots/car_cluster.png), 25 fps on the desktop with simulated time tracking the clock; the unix MicroPython build runs it without error; the wasm gallery boots it in headless Chromium, draws, and an ArrowLeft reaches the car; tests pass (116).

While building it, three defects in the LVGL binding came up and are filed on lvgl-bindings: #38 (struct arrays), #39 (gradient helpers missing), #40 (struct dir()).

…dial look

The old cluster was a 1024x512 bank of four analog gauges with menu rails
and eight screens. This one is the two-dial EV layout: speed and motor
power as neon rings, odometer and miles per kWh under them, the clock,
date and outside temperature along the top, turn indicators, a lit lane
to the horizon with the car's marker, and P R N D S along the bottom.
The car drives itself round a 90 second loop; the arrow keys hold a
turn signal and Enter pauses the drive.

Each ring is drawn once on a canvas (a colour sweep of short arc
segments, a tick ring, a hairline) with three cheap moving parts over
it: a cover arc the colour of the empty track, a blurred glow arc, and a
bright cap on the leading edge. The hood lines are line pieces on strip
canvases, since an arc several screens wide crashes the renderer. No
image assets, so it runs in the wasm gallery, on CPython and on
MicroPython unchanged.

Manifests, the gallery card and thumbnail, the screenshots page and the
resolution test follow the new files.
@bdbarnett
bdbarnett merged commit 641de74 into main Oct 23, 2026
4 checks passed
@bdbarnett
bdbarnett deleted the car-cluster-ev branch October 23, 2026 07:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant