roo_blink
API Documentation for roo_blink
Loading...
Searching...
No Matches
roo_blink Namespace Reference

Data Structures

class  Blinker
 Runs blink sequences on a monochrome LED. More...
 
class  BlinkSequence
 Sequence of steps for monochrome blinking. More...
 
class  Color
 Simple 24-bit RGB color value. More...
 
class  Led
 Abstract interface representing a monochrome LED. More...
 
class  NeoPixelLed
 RGB LED backed by an Adafruit_NeoPixel instance. More...
 
class  RgbBlinker
 Runs blink sequences on an RGB LED. More...
 
class  RgbBlinkSequence
 Sequence of steps for RGB blinking. More...
 
class  RgbLed
 Abstract interface representing an RGB LED. More...
 
class  RgbStep
 Single step of an RGB blink sequence. More...
 
class  Step
 Single step of a monochrome blink sequence. More...
 

Functions

roo_scheduler::Scheduler & DefaultScheduler ()
 Returns the default scheduler used for blinking operations.
 
BlinkSequence Blink (roo_time::Duration period, int duty_percent=50, int rampup_percent_on=0, int rampup_percent_off=0)
 Creates a symmetric blink sequence with optional ramp-up/down segments.
 
constexpr Step TurnOn ()
 Creates a step that sets the LED to the maximum brightness instantly.
 
constexpr Step TurnOff ()
 Creates a step that sets the LED to completely off instantly.
 
constexpr Step SetTo (uint16_t level)
 Creates a step that sets the LED to the specified brightness instantly.
 
constexpr Step FadeTo (uint16_t level, roo_time::Duration duration)
 Creates a step that fades linearly to the target level over the duration.
 
constexpr Step FadeOn (roo_time::Duration duration)
 Creates a step that fades linearly to the maximum brightness over duration.
 
constexpr Step FadeOff (roo_time::Duration duration)
 Creates a step that fades linearly down to off over the duration.
 
constexpr Step Hold (roo_time::Duration duration)
 Creates a step that maintains the current brightness for the duration.
 
RgbBlinkSequence RgbBlink (roo_time::Duration period, Color color, int duty_percent=50, int rampup_percent_on=0, int rampup_percent_off=0)
 Creates a symmetric blink sequence with optional ramp-up/down segments.
 
constexpr RgbStep RgbSetTo (Color color)
 Creates a step that sets the LED to the specified color instantly.
 
constexpr RgbStep RgbTurnOff ()
 Creates a step that disables the LED. Equivalent to RgbSetTo(Color()).
 
constexpr RgbStep RgbFadeTo (Color color, roo_time::Duration duration)
 Creates a step that fades to the target color over the duration.
 
constexpr RgbStep RgbFadeOff (roo_time::Duration duration)
 Creates a step that fades the LED off over the duration.
 
constexpr RgbStep RgbHold (roo_time::Duration duration)
 Creates a step that holds the current color for the duration.
 

Function Documentation

◆ Blink()

BlinkSequence roo_blink::Blink ( roo_time::Duration  period,
int  duty_percent,
int  rampup_percent_on,
int  rampup_percent_off 
)

Creates a symmetric blink sequence with optional ramp-up/down segments.

Definition at line 120 of file blinker.cpp.

References roo_blink::BlinkSequence::add(), FadeOff(), FadeOn(), Hold(), TurnOff(), and TurnOn().

◆ DefaultScheduler()

roo_scheduler::Scheduler & roo_blink::DefaultScheduler ( )

Returns the default scheduler used for blinking operations.

Definition at line 21 of file default_scheduler.cpp.

◆ FadeOff()

constexpr Step roo_blink::FadeOff ( roo_time::Duration  duration)
constexpr

Creates a step that fades linearly down to off over the duration.

Definition at line 146 of file blinker.h.

Referenced by Blink().

◆ FadeOn()

constexpr Step roo_blink::FadeOn ( roo_time::Duration  duration)
constexpr

Creates a step that fades linearly to the maximum brightness over duration.

Definition at line 142 of file blinker.h.

Referenced by Blink().

◆ FadeTo()

constexpr Step roo_blink::FadeTo ( uint16_t  level,
roo_time::Duration  duration 
)
constexpr

Creates a step that fades linearly to the target level over the duration.

Definition at line 138 of file blinker.h.

◆ Hold()

constexpr Step roo_blink::Hold ( roo_time::Duration  duration)
constexpr

Creates a step that maintains the current brightness for the duration.

Definition at line 150 of file blinker.h.

Referenced by Blink().

◆ RgbBlink()

RgbBlinkSequence roo_blink::RgbBlink ( roo_time::Duration  period,
Color  color,
int  duty_percent,
int  rampup_percent_on,
int  rampup_percent_off 
)

Creates a symmetric blink sequence with optional ramp-up/down segments.

Definition at line 122 of file blinker.cpp.

References roo_blink::RgbBlinkSequence::add(), RgbFadeOff(), RgbFadeTo(), RgbHold(), RgbSetTo(), and RgbTurnOff().

◆ RgbFadeOff()

constexpr RgbStep roo_blink::RgbFadeOff ( roo_time::Duration  duration)
constexpr

Creates a step that fades the LED off over the duration.

Definition at line 132 of file blinker.h.

Referenced by RgbBlink().

◆ RgbFadeTo()

constexpr RgbStep roo_blink::RgbFadeTo ( Color  color,
roo_time::Duration  duration 
)
constexpr

Creates a step that fades to the target color over the duration.

Definition at line 128 of file blinker.h.

Referenced by RgbBlink().

◆ RgbHold()

constexpr RgbStep roo_blink::RgbHold ( roo_time::Duration  duration)
constexpr

Creates a step that holds the current color for the duration.

Definition at line 124 of file blinker.h.

Referenced by RgbBlink().

◆ RgbSetTo()

constexpr RgbStep roo_blink::RgbSetTo ( Color  color)
constexpr

Creates a step that sets the LED to the specified color instantly.

Definition at line 118 of file blinker.h.

Referenced by RgbBlink().

◆ RgbTurnOff()

constexpr RgbStep roo_blink::RgbTurnOff ( )
constexpr

Creates a step that disables the LED. Equivalent to RgbSetTo(Color()).

Definition at line 122 of file blinker.h.

Referenced by RgbBlink().

◆ SetTo()

constexpr Step roo_blink::SetTo ( uint16_t  level)
constexpr

Creates a step that sets the LED to the specified brightness instantly.

Definition at line 136 of file blinker.h.

◆ TurnOff()

constexpr Step roo_blink::TurnOff ( )
constexpr

Creates a step that sets the LED to completely off instantly.

Definition at line 134 of file blinker.h.

Referenced by Blink().

◆ TurnOn()

constexpr Step roo_blink::TurnOn ( )
constexpr

Creates a step that sets the LED to the maximum brightness instantly.

Definition at line 133 of file blinker.h.

Referenced by Blink().