Characteristic Locus
Inheritance System.Object > FourDigitSevenSegment
Namespace Meadow.Foundation.Displays.Led
Assembly FourDigitSevenSegment.dll

Syntax

public class FourDigitSevenSegment : object

Constructors

FourDigitSevenSegment(IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, Boolean)

Creates a SevenSegment connected to the especified IDigitalOutputPorts

Declaration
public FourDigitSevenSegment(IDigitalOutputPort portDigit1, IDigitalOutputPort portDigit2, IDigitalOutputPort portDigit3, IDigitalOutputPort portDigit4, IDigitalOutputPort portA, IDigitalOutputPort portB, IDigitalOutputPort portC, IDigitalOutputPort portD, IDigitalOutputPort portE, IDigitalOutputPort portF, IDigitalOutputPort portG, IDigitalOutputPort portDecimal, bool isCommonCathode)

Parameters

Type Name Description
IDigitalOutputPort portDigit1
IDigitalOutputPort portDigit2
IDigitalOutputPort portDigit3
IDigitalOutputPort portDigit4
IDigitalOutputPort portA
IDigitalOutputPort portB
IDigitalOutputPort portC
IDigitalOutputPort portD
IDigitalOutputPort portE
IDigitalOutputPort portF
IDigitalOutputPort portG
IDigitalOutputPort portDecimal
System.Boolean isCommonCathode

FourDigitSevenSegment(IMeadowDevice, IPin, IPin, IPin, IPin, IPin, IPin, IPin, IPin, IPin, IPin, IPin, IPin, Boolean)

Creates a SevenSegment connected to the especified IPins to a IODevice

Declaration
public FourDigitSevenSegment(IMeadowDevice device, IPin pinDigit1, IPin pinDigit2, IPin pinDigit3, IPin pinDigit4, IPin pinA, IPin pinB, IPin pinC, IPin pinD, IPin pinE, IPin pinF, IPin pinG, IPin pinDecimal, bool isCommonCathode)

Parameters

Type Name Description
IMeadowDevice device
IPin pinDigit1
IPin pinDigit2
IPin pinDigit3
IPin pinDigit4
IPin pinA
IPin pinB
IPin pinC
IPin pinD
IPin pinE
IPin pinF
IPin pinG
IPin pinDecimal
System.Boolean isCommonCathode

Fields

animationThread

Declaration
protected Task animationThread

Field Value

Type Description
Task

cts

Declaration
protected CancellationTokenSource cts

Field Value

Type Description
CancellationTokenSource

digits

Declaration
protected readonly IDigitalOutputPort[] digits

Field Value

Type Description
IDigitalOutputPort[]

sevenSegments

Declaration
protected SevenSegment[] sevenSegments

Field Value

Type Description
SevenSegment[]

Methods

SetDisplay(Char[], Int32)

Displays the specified characters

Declaration
public void SetDisplay(char[] characters, int decimalLocation = null)

Parameters

Type Name Description
System.Char[] characters
System.Int32 decimalLocation

SetDisplay(String, Int32)

Displays the specified characters

Declaration
public void SetDisplay(string characters, int decimalLocation = null)

Parameters

Type Name Description
System.String characters
System.Int32 decimalLocation

StartDisplayLoop(Char[], Int32, CancellationToken)

Declaration
protected Task StartDisplayLoop(char[] characters, int decimalLocation, CancellationToken cancellationToken)

Parameters

Type Name Description
System.Char[] characters
System.Int32 decimalLocation
CancellationToken cancellationToken

Returns

Type Description
Task

Stop()

Declaration
public void Stop()