C# Класс CyrusBuilt.MonoPi.Components.Lights.LEDComponent

A component that is an abstraction of an LED.
Наследование: LEDBase
Показать файл Открыть проект

Открытые методы

Метод Описание
Blink ( Int32 delay ) : void

Blinks the LED.

Blink ( Int32 delay, Int32 duration ) : void

Blinks the LED.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Components.Lights.LEDComponent object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Lights.LEDComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Lights.LEDComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Lights.LEDComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Lights.LEDComponent was occupying.

LEDComponent ( IGpio pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.LEDComponent class with the pin controlling the LED.

Off ( ) : void

Switches the LED off.

On ( ) : void

Switches the LED on.

Pulse ( Int32 duration ) : void

Pulses the state of the LED.

Pulse ( Int32 duration, System.Boolean blocking ) : void

Pulses the state of the LED.

ToString ( ) : String

Returns a System.String that represents the current CyrusBuilt.MonoPi.Components.Lights.LEDComponent.

Описание методов

Blink() публичный Метод

Blinks the LED.
public Blink ( Int32 delay ) : void
delay System.Int32 /// The delay between state change. ///
Результат void

Blink() публичный Метод

Blinks the LED.
public Blink ( Int32 delay, Int32 duration ) : void
delay System.Int32 /// The delay between state change. ///
duration System.Int32 /// The amount of time to blink the LED (in milliseconds). ///
Результат void

Dispose() публичный Метод

Releases all resource used by the CyrusBuilt.MonoPi.Components.Lights.LEDComponent object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Lights.LEDComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Lights.LEDComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Lights.LEDComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Lights.LEDComponent was occupying.
public Dispose ( ) : void
Результат void

LEDComponent() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Lights.LEDComponent class with the pin controlling the LED.
/// The pin cannot be null. ///
public LEDComponent ( IGpio pin ) : System
pin IGpio /// The output pin the LED is wired to. ///
Результат System

Off() публичный Метод

Switches the LED off.
/// The pin is configured for input instead of output. ///
public Off ( ) : void
Результат void

On() публичный Метод

Switches the LED on.
/// The pin is configured for input instead of output. ///
public On ( ) : void
Результат void

Pulse() публичный Метод

Pulses the state of the LED.
public Pulse ( Int32 duration ) : void
duration System.Int32 /// The amount of time to pulse the LED. ///
Результат void

Pulse() публичный Метод

Pulses the state of the LED.
public Pulse ( Int32 duration, System.Boolean blocking ) : void
duration System.Int32 /// The amount of time to pulse the LED. ///
blocking System.Boolean /// Blocks the current thread while pulsing. ///
Результат void

ToString() публичный Метод

Returns a System.String that represents the current CyrusBuilt.MonoPi.Components.Lights.LEDComponent.
public ToString ( ) : String
Результат String