Expand description
LED ring animation engine: spatial patterns + temporal modifiers.
Generic over ring size (N LEDs per ring). Default is 12.
No-std compatible, no allocator needed.
§Usage
use led_ring::{LedRing, RingAnimation, Rgb, PEDALBOARD_CLOCK_MAP};
// 12-LED ring with pedalboard PCB mapping
let mut ring = LedRing::<12>::new(&PEDALBOARD_CLOCK_MAP);
ring.set(RingAnimation::solid(Rgb::new(255, 0, 0)));
let frame = ring.render(0);
assert!(frame.iter().all(|px| *px == Rgb::new(255, 0, 0)));Structs§
- LedRing
- Stateful LED ring that tracks animation and renders frames.
- Rgb
- RGB color (matches smart_leds::RGB8 layout).
- Ring
Animation - Complete ring animation state.
Enums§
- Modifier
- Temporal modifier — how rendered pixels change over time.
- Renderer
- Spatial pattern — which LEDs are lit and what color.
Constants§
- IDENTITY_
MAP - Identity clock map for N LEDs (position i maps to physical index i).
- PEDALBOARD_
CLOCK_ MAP - Clock-position mapping for the pedalboard PCB (12 LEDs). PCB layout: D1=3h, D2=2h, …, D12=4h.
Functions§
- hue_
to_ rgb - HSV hue (0–255) to RGB at full saturation/value.