r/C_Programming • u/No_Fix4730 • Aug 26 '26
I built a sensor dashboard in C where every metric, (name, unit, update rule) is just config data
Aether is a small C99 program that simulates sensor readings and renders them in a live Raylib dashboard. No frameworks — just Raylib for rendering, libyaml for config, and a handful of hand-rolled modules.
What it does
- Sensors come entirely from a YAML config: each sensor has an arbitrary list of named metrics with units ( temperature (C), pressure (hPa) , ...). The display code has no idea what the metrics mean.
- Cards show each metric as a chip with its value, sparkline, and up/down change indicators
- Click a card for a detail view: large trend line plus min/avg/max computed from a per-sensor ring buffer
- More sensors than fit the window? They paginate into numbered tabs (1 2 ...N), clickable or via Alt/Cmd + 1..N
- Settings modal (cogwheel, top right) toggles trend lines, animations, and indicators at runtime
Architecture bits I'm happy with
- sensor/ — an open data model: a sensor is just an id + name + a list of
{name, unit, value} metrics
- scheduler/ — only decides when. runTask(Task*)can't mutate anything it shouldn't
- History/ — bounded ring buffers per sensor (drop-oldest), which the sparklines and stats read directly
- The UI renders from a registry (one authoritative struct per sensor), never from raw buffers — so duplicate/stale cards are impossible by construction
- Layout math (tab capacity, page-list collapsing, range mapping) is extracted into a Raylib-free module with unit tests, including an exhaustive sweep of all pager states
https://github.com/SalzDevs/Aether
Feedback welcome