Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
Public Member Functions | List of all members
HT16K33expander Class Reference

HT16K33 Expander Hardware class. More...

#include <Noiasca_HT16K33.h>

Public Member Functions

 HT16K33expander (uint8_t i2cAddr)
 
 HT16K33expander (TwoWire &i2cPort, uint8_t i2cAddr)
 
int clear ()
 
int setBrightness (uint8_t b)
 
void digitalWrite (uint8_t pin, uint8_t val)
 write to a pin More...
 
void setPinStatus (uint8_t _pinStatus)
 ‍** More...
 

Detailed Description

HT16K33 Expander Hardware class.

Takes Wire and I2C address and administrates the port. This connects the low level hardware. The class is needed becauses each pin on the HT16K33 should be treated seperately but the IC accepts needs a bitmask for each common cathode.

Constructor & Destructor Documentation

◆ HT16K33expander() [1/2]

HT16K33expander::HT16K33expander ( uint8_t  i2cAddr)
inline
Parameters
i2cAddrthe I2C address (0x70 - 0x77)

◆ HT16K33expander() [2/2]

HT16K33expander::HT16K33expander ( TwoWire &  i2cPort,
uint8_t  i2cAddr 
)
inline
Parameters
i2cAddrthe I2C address (0x70 - 0x77)
i2cPortuse Wire or any other TwoWire (I2C) interface you have available on your microcontroller

Member Function Documentation

◆ clear()

int HT16K33expander::clear ( )
inline

reset all pins

◆ setBrightness()

int HT16K33expander::setBrightness ( uint8_t  b)
inline

set the brightness of the display

◆ digitalWrite()

void HT16K33expander::digitalWrite ( uint8_t  pin,
uint8_t  val 
)
inline

write to a pin

set or unset an output pin. The pin is 0..127 (8 common cathodes with 16 common anodes)

Parameters
pinthe pin to write.
valthe value LOW or HIGH

◆ setPinStatus()

void HT16K33expander::setPinStatus ( uint8_t  _pinStatus)
inline

‍**

set pin status

This function only sets the internal variable - doesn't change pins

Parameters
_pinStatusthe new value for the pin status