Skip to main content

Class Ht16k33

Represents an Ht16k33 128 led driver and 39 key scanner

Assembly: Ht16k33.dll
View Source
Declaration
public class Ht16k33 : II2cPeripheral

Implements:
Meadow.Hardware.II2cPeripheral

Properties

DefaultI2cAddress

The default I2C address for the peripheral

View Source
Declaration
public byte DefaultI2cAddress { get; }

Fields

i2cComms

I2C Communication bus used to communicate with the peripheral

View Source
Declaration
protected readonly II2cCommunications i2cComms

Methods

Set14SegmentMessage(string)

Set a message on a 14-segment display array

View Source
Declaration
public void Set14SegmentMessage(string message)
Parameters
TypeNameDescription
System.StringmessageThe message (up to 4 characters)

Set14SegmentDisplay(char, int)

Set a single 14-segment display to a specific character

View Source
Declaration
public void Set14SegmentDisplay(char character, int displayIndex)
Parameters
TypeNameDescription
System.CharcharacterThe ASCII character
System.Int32displayIndexThe display index (0-3)

SetIsAwake(bool)

Set controller to awake / asleep

View Source
Declaration
public void SetIsAwake(bool awake)
Parameters
TypeNameDescription
System.BooleanawakeAwake if true

SetDisplayOn(bool)

Set display on or off

View Source
Declaration
public void SetDisplayOn(bool isOn)
Parameters
TypeNameDescription
System.BooleanisOnOn if true

SetBlinkRate(BlinkRate)

Set display blink rate

View Source
Declaration
public void SetBlinkRate(Ht16k33.BlinkRate blinkRate)
Parameters
TypeNameDescription
Meadow.Foundation.ICs.IOExpanders.Ht16k33.BlinkRateblinkRateThe blink rate as a byte

SetBrightness(Brightness)

Set display brightness

View Source
Declaration
public void SetBrightness(Ht16k33.Brightness brightness)
Parameters
TypeNameDescription
Meadow.Foundation.ICs.IOExpanders.Ht16k33.BrightnessbrightnessThe brightness

ClearDisplay()

Clear the display

View Source
Declaration
public void ClearDisplay()

UpdateDisplay()

Refresh the display

View Source
Declaration
public void UpdateDisplay()

SetLed(byte, bool)

Set an individual led on or off

View Source
Declaration
public void SetLed(byte ledIndex, bool ledOn)
Parameters
TypeNameDescription
System.ByteledIndexThe led index
System.BooleanledOnTrue for on
Exceptions

System.IndexOutOfRangeException
Throws if the index is out of range

ToggleLed(byte)

Toggle an led on or off

View Source
Declaration
public void ToggleLed(byte ledIndex)
Parameters
TypeNameDescription
System.ByteledIndexThe led index

IsLedOn(int)

Is led at index on

View Source
Declaration
public bool IsLedOn(int ledIndex)
Returns

System.Boolean: True if on

Parameters
TypeNameDescription
System.Int32ledIndexThe led index

Implements

  • Meadow.Hardware.II2cPeripheral