C# 클래스 CyrusBuilt.MonoPi.Components.Lights.LEDComponent

A component that is an abstraction of an LED.
상속: LEDBase
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
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