Skip to main content

Meadow.Foundation.Displays.Led.SixteenSegment

SixteenSegment
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Displays.Led.SixteenSegment

Code Example

SixteenSegment sixteenSegment;

public override Task Initialize()
{
Resolver.Log.Info("Initializing...");

sixteenSegment = new SixteenSegment
(
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),
portH: Device.CreateDigitalOutputPort(Device.Pins.D07),
portK: Device.CreateDigitalOutputPort(Device.Pins.D08),
portM: Device.CreateDigitalOutputPort(Device.Pins.D09),
portN: Device.CreateDigitalOutputPort(Device.Pins.D10),
portP: Device.CreateDigitalOutputPort(Device.Pins.D11),
portR: Device.CreateDigitalOutputPort(Device.Pins.D12),
portS: Device.CreateDigitalOutputPort(Device.Pins.D13),
portT: Device.CreateDigitalOutputPort(Device.Pins.D14),
portU: Device.CreateDigitalOutputPort(Device.Pins.D15),
portDecimal: Device.CreateDigitalOutputPort(Device.Pins.A00),
isCommonCathode: false
);

return base.Initialize();
}

public override Task Run()
{
sixteenSegment.SetDisplay(asciiCharacter: 'Z', showDecimal: true);

return base.Run();
}

Sample project(s) available on GitHub

Class SixteenSegment

Sixteen Segment Display

Assembly: SixteenSegment.dll
View Source
Declaration
public class SixteenSegment : 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
TypeName
System.CharasciiCharacter
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(SixteenSegment.Segment segment, char asciiCharacter)
Returns

System.Boolean

Parameters
TypeNameDescription
Meadow.Foundation.Displays.Led.SixteenSegment.SegmentsegmentThe led segment
System.CharasciiCharacterThe 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
TypeNameDescription
System.BooleandisposingIs disposing

Implements

  • System.IDisposable