Skip to main content

Meadow.Foundation.ICs.IOExpanders.Ht16k33

Ht16k33
StatusStatus badge: working
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Ht16k33

The HT16K33 is an LED driver and key scanner. It can be used to drive up to 128 leds and is often found pre-assembled with 14-segment led displays. The HT16K33 is controlled via I2C.

Code Example

Ht16k33 ht16k33;

public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
ht16k33 = new Ht16k33(Device.CreateI2cBus());

return base.Initialize();
}

public override async Task Run()
{
int index = 0;
bool on = true;

while (true)
{
ht16k33.SetLed((byte)index, on);
ht16k33.UpdateDisplay();
index++;

if (index >= 128)
{
index = 0;
on = !on;
}

await Task.Delay(100);
}
}

Sample project(s) available on GitHub

Wiring Example

To wire a TM1637 to your Meadow board, connect the following:

TM1637Meadow Pin
GNDGND
VCC3V3
SCLD08 (SCL Pin)
SDAD07 (SDA Pin)