Skip to main content

Class Led

Utility functions to provide blinking for Led

Assembly: Meadow.Foundation.dll​
View Source​
Declaration
public class Led : ILed, IDisposable

Implements:
Meadow.Peripherals.Leds.ILed, System.IDisposable

Properties​

IsOn​

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

View Source​
Declaration
public bool IsOn { get; set; }

Port​

Gets the port that is driving the LED

View Source​
Declaration
protected IDigitalOutputPort Port { get; set; }

IsDisposed​

Is the object disposed

View Source​
Declaration
public bool IsDisposed { get; }

Methods​

StopAnimation()​

Stops blink animation.

View Source​
Declaration
public Task StopAnimation()
Returns​

System.Threading.Tasks.Task

Blink animation that turns the LED on (500ms) and off (500ms)

View Source​
Declaration
public Task StartBlink()
Returns​

System.Threading.Tasks.Task

StartBlink(TimeSpan, TimeSpan)​

Blink animation that turns the LED on and off based on the OnDuration and offDuration values in ms

View Source​
Declaration
public Task StartBlink(TimeSpan onDuration, TimeSpan offDuration)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
System.TimeSpanonDuration
System.TimeSpanoffDuration

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source​
Declaration
public void Dispose()

Dispose(bool)​

Dispose of the object

View Source​
Declaration
protected virtual void Dispose(bool disposing)
Parameters​
TypeNameDescription
System.BooleandisposingIs disposing

Implements​

  • Meadow.Peripherals.Leds.ILed
  • System.IDisposable