Meadow.Foundation.Displays.Led.FourteenSegment
FourteenSegment | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
FourteenSegment fourteenSegment;
public override Task Initialize()
{
Resolver.Log.Info("Initializing...");
fourteenSegment = new FourteenSegment
(
portA: Device.CreateDigitalOutputPort(Device.Pins.D00),
portB: Device.CreateDigitalOutputPort(Device.Pins.D01),
portC: Device.CreateDigitalOutputPort(Device.Pins.D02),
portD: Device.CreateDigitalOutputPort(Device.Pins.D03),
portE: Device.CreateDigitalOutputPort(Device.Pins.D04),
portF: Device.CreateDigitalOutputPort(Device.Pins.D05),
portG: Device.CreateDigitalOutputPort(Device.Pins.D06),
portG2: Device.CreateDigitalOutputPort(Device.Pins.D07),
portH: Device.CreateDigitalOutputPort(Device.Pins.D08),
portJ: Device.CreateDigitalOutputPort(Device.Pins.D09),
portK: Device.CreateDigitalOutputPort(Device.Pins.D10),
portL: Device.CreateDigitalOutputPort(Device.Pins.D11),
portM: Device.CreateDigitalOutputPort(Device.Pins.D12),
portN: Device.CreateDigitalOutputPort(Device.Pins.D13),
portDecimal: Device.CreateDigitalOutputPort(Device.Pins.D14),
isCommonCathode: false
);
return base.Initialize();
}
public override Task Run()
{
fourteenSegment.SetDisplay(asciiCharacter: 'A', showDecimal: true);
return base.Run();
}
Sample project(s) available on GitHub
Class FourteenSegment
Fourteen Segment Display
Assembly: FourteenSegment.dll
View Source
Declaration
public class FourteenSegment : IDisposable
Implements:
System.IDisposable
Properties
IsDisposed
Is the object disposed
View Source
Declaration
public bool IsDisposed { get; }
Methods
SetDisplay(char, bool?)
Displays the specified ASCII character (from 32 to 126) Unsupported ASCII values will be blank
View Source
Declaration
public void SetDisplay(char asciiCharacter, bool? showDecimal = null)
Parameters
Type | Name |
---|---|
System.Char | asciiCharacter |
System.Nullable<System.Boolean> | showDecimal |
IsEnabled(Segment, char)
Is a specific led segment enabled for an ASCII character
View Source
Declaration
public static bool IsEnabled(FourteenSegment.Segment segment, char asciiCharacter)
Returns
System.Boolean
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.Displays.Led.FourteenSegment.Segment | segment | The led segment |
System.Char | asciiCharacter | The ASCII character |
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
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
Implements
System.IDisposable