I2Cwrapper v0.5.0
Generic framework for Arduino I2C target devices
TM1638liteI2C Class Reference

An I2C wrapper class for Danny Ayers' TM1638lite library (https://www.arduino.cc/reference/en/libraries/tm1638lite/) More...

Detailed Description

An I2C wrapper class for Danny Ayers' TM1638lite library (https://www.arduino.cc/reference/en/libraries/tm1638lite/)

Public Member Functions

 TM1638liteI2C (I2Cwrapper *w)
 Constructor. More...
 
void attach (uint8_t strobe, uint8_t clock, uint8_t data)
 Replaces the TM1638lite constructor and takes the same arguments. Will allocate an TM1638lite object on the target's side and make it ready for use. Check myNum >= 0 to see if the target successfully added the object. If not, it's -1. More...
 
void sendCommand (uint8_t value)
 
void reset ()
 
uint8_t readButtons ()
 
void setLED (uint8_t position, uint8_t value)
 
void displayText (String text)
 
void displaySS (uint8_t position, uint8_t value)
 
void displayASCII (uint8_t position, uint8_t ascii)
 
void displayHex (uint8_t position, uint8_t hex)
 

Public Attributes

int8_t myNum = -1
 

Constructor & Destructor Documentation

◆ TM1638liteI2C()

TM1638liteI2C::TM1638liteI2C ( I2Cwrapper w)

Constructor.

Parameters
wWrapper object representing the target a TM1638 is connected to.

Member Function Documentation

◆ attach()

void TM1638liteI2C::attach ( uint8_t  strobe,
uint8_t  clock,
uint8_t  data 
)

Replaces the TM1638lite constructor and takes the same arguments. Will allocate an TM1638lite object on the target's side and make it ready for use. Check myNum >= 0 to see if the target successfully added the object. If not, it's -1.

Parameters
strobe,clock,dataSee original library
Note
The target's platform pin names might not be known to the controller's platform, if both are different. So it is safer to use integer equivalents as defined in the respective platform's pins_arduino.h

◆ displayASCII()

void TM1638liteI2C::displayASCII ( uint8_t  position,
uint8_t  ascii 
)

◆ displayHex()

void TM1638liteI2C::displayHex ( uint8_t  position,
uint8_t  hex 
)

◆ displaySS()

void TM1638liteI2C::displaySS ( uint8_t  position,
uint8_t  value 
)

◆ displayText()

void TM1638liteI2C::displayText ( String  text)
Note
: displayText() is implemented locally at the controller's side to avoid having to send arbitrary long strings. This happens transparently for the caller and might only lead to problems if the original library's code changes.

◆ readButtons()

uint8_t TM1638liteI2C::readButtons ( )

◆ reset()

void TM1638liteI2C::reset ( )

◆ sendCommand()

void TM1638liteI2C::sendCommand ( uint8_t  value)

◆ setLED()

void TM1638liteI2C::setLED ( uint8_t  position,
uint8_t  value 
)

Member Data Documentation

◆ myNum

int8_t TM1638liteI2C::myNum = -1

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