Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.8 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.8 KB

Segment display driver (HT16K33)

This project contains multipurpose LED display drivers and binding implementations for concrete display configurations.

Documentation

The HT16K33 is LED display driver that supports multiple LED configurations and I2C communication.

Adafruit sells multiple display backpacks built upon this driver:

More information on wiring can be found on the respective product pages.

Usage

// Initialize display (busId = 1 for Raspberry Pi 2 & 3)
var display = new Large4Digit7SegmentDisplay(I2cDevice.Create(new I2cConnectionSettings(busId: 1, address: Ht16k33.DefaultI2cAddress));

// Set max brightness (automatically turns on display)
display.Brightness = display.MaxBrightness;

// Write time to the display
display.Write(DateTime.Now.ToString("H:mm").PadLeft(5));

// Wait 5 seconds
Thread.Sleep(5000);

// Turn on buffering
display.BufferingEnabled = true;

// Write -42°C to display using "decimal point" between 3rd and 4th digit as the ° character
display.Write("-42C");
display.Dots = Dot.DecimalPoint;

// Send buffer to the device
display.Flush();

// Dispose display object (the device itself will not be turned off until powered down)
display.Dispose();