Skip to main content

Crate rgb_sequencer

Crate rgb_sequencer 

Source
Expand description

no_std RGB LED animation library for embedded systems.

Provides step-based and function-based color sequences with trait abstractions for LED hardware and timing. Zero heap allocation, platform-independent, type-safe colors via palette::Srgb<f32>.

§Core Types

  • RgbSequence - Defines an animation (steps, loops, transitions, colors)
  • RgbSequencer - Controls a single LED through sequences with state management
  • RgbLed - Trait for LED hardware abstraction
  • TimeSource - Trait for timing system abstraction
  • TransitionStyle - How to animate between colors (Step, Linear, EaseIn/Out)

§Color Helpers

  • colors module - HSV color space helpers for intuitive color creation

Uses f32 extensively - performance varies by FPU availability.

Re-exports§

pub use command::SequencerAction;
pub use command::SequencerCommand;
pub use sequence::RgbSequence;
pub use sequence::SequenceBuilder;
pub use sequence::StepPosition;
pub use sequencer::DEFAULT_COLOR_EPSILON;
pub use sequencer::Position;
pub use sequencer::RgbLed;
pub use sequencer::RgbSequencer;
pub use sequencer::SequencerError;
pub use sequencer::SequencerState;
pub use sequencer::ServiceTiming;
pub use time::TimeDuration;
pub use time::TimeInstant;
pub use time::TimeSource;
pub use types::LoopCount;
pub use types::SequenceError;
pub use types::SequenceStep;
pub use types::TransitionStyle;

Modules§

colors
Color space conversion helpers.
command
Command-based control for sequencers.
sequence
RGB color sequence definitions and evaluation.
sequencer
RGB LED sequencer with state management.
time
Time abstraction traits for platform-agnostic timing.
types
Core types for sequence construction.

Constants§

BLACK
Black color (all channels off).
BLUE
Blue color (full blue channel).
CYAN
Cyan color (green + blue).
GREEN
Green color (full green channel).
MAGENTA
Magenta color (red + blue).
RED
Red color (full red channel).
WHITE
White color (all channels full).
YELLOW
Yellow color (red + green).

Type Aliases§

RgbSequence4
RGB sequence with capacity for 4 steps.
RgbSequence8
RGB sequence with capacity for 8 steps.
RgbSequence16
RGB sequence with capacity for 16 steps.
RgbSequencer4
RGB sequencer with capacity for 4 steps.
RgbSequencer8
RGB sequencer with capacity for 8 steps.
RgbSequencer16
RGB sequencer with capacity for 16 steps.
SequencerAction4
Sequencer action with capacity for 4 steps.
SequencerAction8
Sequencer action with capacity for 8 steps.
SequencerAction16
Sequencer action with capacity for 16 steps.
SequencerCommand4
Sequencer command with capacity for 4 steps.
SequencerCommand8
Sequencer command with capacity for 8 steps.
SequencerCommand16
Sequencer command with capacity for 16 steps.
Srgb
Non-linear sRGB, the most common RGB input/output format.