Skip to main content

Interface IRgbLed

Defines an RGB Light Emitting Diode (LED).

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

Methods

SetColor(RgbLedColors)

Sets the current color of the LED.

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

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
Declaration
Task StartBlink(RgbLedColors color)
Returns

System.Threading.Tasks.Task

Parameters
TypeNameDescription
Meadow.Peripherals.Leds.RgbLedColorscolorThe LED color

StartBlink(RgbLedColors, TimeSpan, TimeSpan)

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

View Source
Declaration
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