Skip to main content

Interface IRgbLed

Defines an RGB Light Emitting Diode (LED).

Assembly: Meadow.Contracts.dll
View Source
public interface IRgbLed

Properties

IsOn

Gets or sets a value indicating whether the LED is on.

View Source
bool IsOn { get; set; }

Methods

SetColor(RgbLedColors)

Sets the current color of the LED.

View Source
void SetColor(RgbLedColors color)
Parameters
TypeNameDescription
Meadow.Peripherals.Leds.RgbLedColorscolorThe color value

StopAnimation()

Stops the current LED animation

View Source
Task StopAnimation()
Returns

System.Threading.Tasks.Task

Start the Blink animation which sets turns the LED on and off on an interval of 1 second (500ms on, 500ms off)

View Source
Task StartBlink()
Returns

System.Threading.Tasks.Task

StartBlink(RgbLedColors)

Start the Blink animation which sets turns the LED on and off on an interval of 1 second (500ms on, 500ms off)

View Source
Task StartBlink(RgbLedColors color)
Returns

System.Threading.Tasks.Task

Parameters
TypeNameDescription
Meadow.Peripherals.Leds.RgbLedColorscolorThe LED color

StartBlink(TimeSpan, TimeSpan)

Start the Blink animation which sets turns the LED on and off with the specified durations and current color

View Source
Task StartBlink(TimeSpan onDuration, TimeSpan offDuration)
Returns

System.Threading.Tasks.Task

Parameters
TypeNameDescription
System.TimeSpanonDurationThe duration the LED stays on
System.TimeSpanoffDurationThe duration the LED stays off

StartBlink(RgbLedColors, TimeSpan, TimeSpan)

Start the Blink animation which sets turns the LED on and off with the specified durations and color

View Source
Task StartBlink(RgbLedColors color, TimeSpan onDuration, TimeSpan offDuration)
Returns

System.Threading.Tasks.Task

Parameters
TypeNameDescription
Meadow.Peripherals.Leds.RgbLedColorscolorThe LED color
System.TimeSpanonDurationThe duration the LED stays on
System.TimeSpanoffDurationThe duration the LED stays off