SBK_HT16K33 library 1.0.0
Standalone Arduino library to control HT16K33 LED matrices or bar meters via I2C. Can be used directly or as a driver for SBK_BarDrive animations.
Loading...
Searching...
No Matches
SBK_HT16K33 Class Reference

I2C driver wrapper for HT16K33 compatible with SBK_BarMeter and SBK_BarDrive. More...

#include <SBK_HT16K33.h>

Public Member Functions

 SBK_HT16K33 (uint8_t addr)
 Construct a new SBK_HT16K33 instance.
 ~SBK_HT16K33 ()
 Destructor. Frees allocated buffer memory.
void begin ()
 Initialize the HT16K33 device at a given I2C address.
void clear (uint8_t device)
 Clear the display buffer (device parameter ignored)(API-compatible wrapper).
void clear ()
 Clear the internal display buffer.
void setBrightness (uint8_t device, uint8_t brightness)
 Set the brightness level (0–15) of the device (API-compatible wrapper).
void setBrightness (uint8_t brightness)
 Set the brightness level (0–15).
void setLed (uint8_t device, uint8_t row, uint8_t col, bool state)
 Set an individual LED on or off (device-specific call) (API-compatible wrapper).
void setLed (uint8_t row, uint8_t col, bool state)
 Set an individual LED on or off.
bool getLed (uint8_t device, uint8_t row, uint8_t col) const
 Get the current state of an LED in the buffer (API-compatible wrapper).
bool getLed (uint8_t row, uint8_t col) const
 Get the current state of an LED in the buffer.
void show (uint8_t device)
 Push internal buffer to the device (API-compatible wrapper).
void show ()
 Push internal buffer to the display.

Detailed Description

I2C driver wrapper for HT16K33 compatible with SBK_BarMeter and SBK_BarDrive.

Constructor & Destructor Documentation

◆ SBK_HT16K33()

SBK_HT16K33::SBK_HT16K33 ( uint8_t addr)

Construct a new SBK_HT16K33 instance.

Parameters
addrI2C address of the HT16K33 device.

◆ ~SBK_HT16K33()

SBK_HT16K33::~SBK_HT16K33 ( )

Destructor. Frees allocated buffer memory.

Member Function Documentation

◆ begin()

void SBK_HT16K33::begin ( )

Initialize the HT16K33 device at a given I2C address.

◆ clear() [1/2]

void SBK_HT16K33::clear ( )

Clear the internal display buffer.

◆ clear() [2/2]

void SBK_HT16K33::clear ( uint8_t device)

Clear the display buffer (device parameter ignored)(API-compatible wrapper).

Parameters
deviceNot used, for compatibility only.

◆ getLed() [1/2]

bool SBK_HT16K33::getLed ( uint8_t device,
uint8_t row,
uint8_t col ) const

Get the current state of an LED in the buffer (API-compatible wrapper).

Parameters
devicenot used, for compatibility only.
rowRow index (0–7).
colColumn index (0–15).
Returns
true if the LED is ON, false otherwise. Get LED state at (row, col)

◆ getLed() [2/2]

bool SBK_HT16K33::getLed ( uint8_t row,
uint8_t col ) const

Get the current state of an LED in the buffer.

Parameters
rowRow index (0–7).
colColumn index (0–15).
Returns
true if the LED is ON, false otherwise. Get LED state at (row, col)

◆ setBrightness() [1/2]

void SBK_HT16K33::setBrightness ( uint8_t brightness)

Set the brightness level (0–15).

Parameters
brightnessBrightness level from 0 (dim) to 15 (bright).

◆ setBrightness() [2/2]

void SBK_HT16K33::setBrightness ( uint8_t device,
uint8_t brightness )

Set the brightness level (0–15) of the device (API-compatible wrapper).

Parameters
devicenot used, for compatibility only.
brightnessBrightness level (0–15).

◆ setLed() [1/2]

void SBK_HT16K33::setLed ( uint8_t device,
uint8_t row,
uint8_t col,
bool state )

Set an individual LED on or off (device-specific call) (API-compatible wrapper).

Parameters
devicenot used, for compatibility only.
rowRow index (0–7).
colColumn index (0–15).
statetrue = ON, false = OFF. Set LED at (row, col)

◆ setLed() [2/2]

void SBK_HT16K33::setLed ( uint8_t row,
uint8_t col,
bool state )

Set an individual LED on or off.

Parameters
rowRow index (0–7).
colColumn index (0–15).
statetrue = ON, false = OFF.

◆ show() [1/2]

void SBK_HT16K33::show ( )

Push internal buffer to the display.

◆ show() [2/2]

void SBK_HT16K33::show ( uint8_t device)

Push internal buffer to the device (API-compatible wrapper).

Parameters
devicenot used, for compatibility only. Push buffer to display

The documentation for this class was generated from the following files:
  • C:/Users/sbara/OneDrive/Samuel - personnel/Electronics/Arduino/Sketches/libraries/SBK_HT16K33/src/SBK_HT16K33.h
  • C:/Users/sbara/OneDrive/Samuel - personnel/Electronics/Arduino/Sketches/libraries/SBK_HT16K33/src/SBK_HT16K33.cpp