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
Type | Name | Description |
---|---|---|
System.String | message | The 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
Type | Name | Description |
---|---|---|
System.Char | character | The ASCII character |
System.Int32 | displayIndex | The display index (0-3) |
SetIsAwake(bool)
Set controller to awake / asleep
View Source
Declaration
public void SetIsAwake(bool awake)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | awake | Awake if true |
SetDisplayOn(bool)
Set display on or off
View Source
Declaration
public void SetDisplayOn(bool isOn)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isOn | On if true |
SetBlinkRate(BlinkRate)
Set display blink rate
View Source
Declaration
public void SetBlinkRate(Ht16k33.BlinkRate blinkRate)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.ICs.IOExpanders.Ht16k33.BlinkRate | blinkRate | The blink rate as a byte |
SetBrightness(Brightness)
Set display brightness
View Source
Declaration
public void SetBrightness(Ht16k33.Brightness brightness)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.ICs.IOExpanders.Ht16k33.Brightness | brightness | The 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
Type | Name | Description |
---|---|---|
System.Byte | ledIndex | The led index |
System.Boolean | ledOn | True 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
Type | Name | Description |
---|---|---|
System.Byte | ledIndex | The led index |
IsLedOn(int)
Is led at index on
View Source
Declaration
public bool IsLedOn(int ledIndex)
Returns
System.Boolean
: True if on
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | ledIndex | The led index |
Implements
Meadow.Hardware.II2cPeripheral