My Project
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TM16XX Class Reference

#include <TM16XX.h>

Inheritance diagram for TM16XX:
TM1638 TM1638QYF TM1640 InvertedTM1638

Public Member Functions

 TM16XX (byte dataPin, byte clockPin, byte strobePin, byte displays, boolean activateDisplay=true, byte intensity=7)
 
virtual void setupDisplay (boolean active, byte intensity)
 
virtual void setDisplayDigit (byte digit, byte pos, boolean dot, const byte numberFont[]=NUMBER_FONT)
 
virtual void setDisplayToError ()
 
virtual void clearDisplayDigit (byte pos, boolean dot)
 
virtual void setDisplay (const byte values[], unsigned int length=8)
 
virtual void clearDisplay ()
 
virtual void setDisplayToString (const char *string, const word dots=0, const byte pos=0, const byte font[]=FONT_DEFAULT)
 
virtual void setDisplayToString (String string, const word dots=0, const byte pos=0, const byte font[]=FONT_DEFAULT)
 

Protected Member Functions

virtual void sendChar (byte pos, byte data, boolean dot)
 
virtual void sendCommand (byte led)
 
virtual void sendData (byte add, byte data)
 
virtual void send (byte data)
 
virtual byte receive ()
 

Protected Attributes

byte displays
 
byte dataPin
 
byte clockPin
 
byte strobePin
 

Constructor & Destructor Documentation

◆ TM16XX()

TM16XX::TM16XX ( byte  dataPin,
byte  clockPin,
byte  strobePin,
byte  displays,
boolean  activateDisplay = true,
byte  intensity = 7 
)

Instantiate a tm16xx module specifying the number of displays, display state, the starting intensity (0-7) data, clock and stobe pins.

Member Function Documentation

◆ clearDisplay()

void TM16XX::clearDisplay ( )
virtual

Clear the display

Reimplemented in TM1638QYF, and TM1640.

◆ clearDisplayDigit()

void TM16XX::clearDisplayDigit ( byte  pos,
boolean  dot 
)
virtual

Clear a single display at pos (starting at 0, left to right)

◆ receive()

byte TM16XX::receive ( )
protectedvirtual

◆ send()

void TM16XX::send ( byte  data)
protectedvirtual

◆ sendChar()

void TM16XX::sendChar ( byte  pos,
byte  data,
boolean  dot 
)
protectedvirtual

Reimplemented in TM1638, InvertedTM1638, and TM1640.

◆ sendCommand()

void TM16XX::sendCommand ( byte  led)
protectedvirtual

◆ sendData()

void TM16XX::sendData ( byte  add,
byte  data 
)
protectedvirtual

◆ setDisplay()

void TM16XX::setDisplay ( const byte  values[],
unsigned int  length = 8 
)
virtual

Set the display to the values (left to right)

Reimplemented in TM1638QYF.

◆ setDisplayDigit()

void TM16XX::setDisplayDigit ( byte  digit,
byte  pos,
boolean  dot,
const byte  numberFont[] = NUMBER_FONT 
)
virtual

Set a single display at pos (starting at 0) to a digit (left to right)

◆ setDisplayToError()

void TM16XX::setDisplayToError ( )
virtual

Set the display to an error message

◆ setDisplayToString() [1/2]

void TM16XX::setDisplayToString ( const char *  string,
const word  dots = 0,
const byte  pos = 0,
const byte  font[] = FONT_DEFAULT 
)
virtual

Set the display to the string (defaults to built in font)

Reimplemented in TM1638QYF.

◆ setDisplayToString() [2/2]

void TM16XX::setDisplayToString ( String  string,
const word  dots = 0,
const byte  pos = 0,
const byte  font[] = FONT_DEFAULT 
)
virtual

Set the display to the String (defaults to built in font)

Reimplemented in TM1638QYF.

◆ setupDisplay()

void TM16XX::setupDisplay ( boolean  active,
byte  intensity 
)
virtual

Set the display (segments and LEDs) active or off and intensity (range from 0-7).

Member Data Documentation

◆ clockPin

byte TM16XX::clockPin
protected

◆ dataPin

byte TM16XX::dataPin
protected

◆ displays

byte TM16XX::displays
protected

◆ strobePin

byte TM16XX::strobePin
protected

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