Treehopper C# API
Ht16k33 Class Reference

Holtek HT16K33 16x8 LED driver More...

Inheritance diagram for Ht16k33:
LedDriver ILedDriver IFlushable

Public Types

enum  Package { Sop20_64Led = 64, Sop24_96Led = 96, Sop28_128Led = 128 }
 The package types of the HT16K33. More...
 

Public Member Functions

 Ht16k33 (I2C i2c, byte address, Package package)
 Construct a new HT16K33 16x8 LED driver More...
 
 Ht16k33 (I2C i2c, Package package, bool a0=false, bool a1=false, bool a2=false)
 Construct a new HT16K33 16x8 LED driver More...
 
override Task FlushAsync (bool force=false)
 Flush the LED states to the HT16K33 driver More...
 
async Task Clear ()
 Clear the display More...
 

Protected Attributes

double brightness
 The internally-referenced global brightness of the LED driver More...
 

Properties

bool AutoFlush = true [get, set]
 Gets or sets whether the display should auto-flush whenever an LED state is changed More...
 
bool HasGlobalBrightnessControl [get, protected set]
 Gets or sets whether this controller supports global brightness control. More...
 
bool HasIndividualBrightnessControl [get]
 Gets or sets whether this controller's LEDs have individual brightness control (through PWM or otherwise). More...
 
double Brightness [get, set]
 The global brightness, from 0.0-1.0, of the LEDs attached to this driver More...
 
IList< LedLeds = new Collection<Led>() [get, set]
 The collection of LEDs that belong to this driver. More...
 
IFlushable Parent [get, protected set]
 Gets the parent device of this LED driver More...
 

Detailed Description

Holtek HT16K33 16x8 LED driver

Member Enumeration Documentation

◆ Package

enum Package
strong

The package types of the HT16K33.

Larger packages support more LEDs.

Enumerator
Sop20_64Led 

The SOP-20 package, supporting 64 (8x8) LEDs

Sop24_96Led 

The SOP-24 package, supporting 96 (12x8) LEDs

Sop28_128Led 

The SOP-28 package, supporting 128 (16x8) LEDs

Constructor & Destructor Documentation

◆ Ht16k33() [1/2]

Ht16k33 ( I2C  i2c,
byte  address,
Package  package 
)

Construct a new HT16K33 16x8 LED driver

Parameters
i2cThe I2c port to use with this display.
addressThe 7-bit I2c address to use
packageWhich package is used

◆ Ht16k33() [2/2]

Ht16k33 ( I2C  i2c,
Package  package,
bool  a0 = false,
bool  a1 = false,
bool  a2 = false 
)

Construct a new HT16K33 16x8 LED driver

Parameters
i2cThe I2c port to use with this display.
packageWhich package to use
a0The state of the A0 address pin
a1The state of the A1 address pin
a2The state of the A2 address pin

Member Function Documentation

◆ FlushAsync()

override Task FlushAsync ( bool  force = false)
virtual

Flush the LED states to the HT16K33 driver

Parameters
forceWhether to force an update, even if no data appears to have changed
Returns

Implements LedDriver.

◆ Clear()

async Task Clear ( )
inherited

Clear the display

Returns
An awaitable task that completes when the display is cleared

Implements ILedDriver.

Member Data Documentation

◆ brightness

double brightness
protectedinherited

The internally-referenced global brightness of the LED driver

Property Documentation

◆ AutoFlush

bool AutoFlush = true
getsetinherited

Gets or sets whether the display should auto-flush whenever an LED state is changed

◆ HasGlobalBrightnessControl

bool HasGlobalBrightnessControl
getprotected setinherited

Gets or sets whether this controller supports global brightness control.

◆ HasIndividualBrightnessControl

bool HasIndividualBrightnessControl
getinherited

Gets or sets whether this controller's LEDs have individual brightness control (through PWM or otherwise).

◆ Brightness

double Brightness
getsetinherited

The global brightness, from 0.0-1.0, of the LEDs attached to this driver

◆ Leds

IList<Led> Leds = new Collection<Led>()
getsetinherited

The collection of LEDs that belong to this driver.

◆ Parent

IFlushable Parent
getprotected setinherited

Gets the parent device of this LED driver


The documentation for this class was generated from the following file: