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
Type | Name | Description |
---|---|---|
Meadow.Peripherals.Leds.RgbLedColors | color | The color value |
StopAnimation()
Stops the current LED animation
View Source
Task StopAnimation()
Returns
System.Threading.Tasks.Task
StartBlink()
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
Type | Name | Description |
---|---|---|
Meadow.Peripherals.Leds.RgbLedColors | color | The 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
Type | Name | Description |
---|---|---|
System.TimeSpan | onDuration | The duration the LED stays on |
System.TimeSpan | offDuration | The 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
Type | Name | Description |
---|---|---|
Meadow.Peripherals.Leds.RgbLedColors | color | The LED color |
System.TimeSpan | onDuration | The duration the LED stays on |
System.TimeSpan | offDuration | The duration the LED stays off |