|
TM1638_plus 2.2.0
Arduino library for Tm1638 modules
|
Class for Model 1 tm1638. More...
#include <TM1638plus.h>

Public Member Functions | |
| TM1638plus (uint8_t strobe, uint8_t clock, uint8_t data, bool highfreq) | |
| Constructor for class TM1638plus. | |
| uint8_t | readButtons (void) |
| Read buttons values from display. | |
| virtual void | setLEDs (uint16_t greenred) |
| Set all LED's on or off Model 1 & 3. | |
| virtual void | setLED (uint8_t position, uint8_t value) |
| Set ONE LED on or off Model 1 & 3. | |
| void | displayText (const char *text) |
| Display a text string on display. | |
| void | displayASCII (uint8_t position, uint8_t ascii, DecimalPoint_e decimalPoint) |
| Display an ASCII character on display. | |
| void | displayHex (uint8_t position, uint8_t hex) |
| Send Hexadecimal value to seven segment. | |
| void | display7Seg (uint8_t position, uint8_t value) |
| Send seven segment value to seven segment. | |
| void | displayIntNum (unsigned long number, boolean leadingZeros=true, AlignTextType_e=TMAlignTextLeft) |
| Display an integer and leading zeros optional. | |
| void | DisplayDecNumNibble (uint16_t numberUpper, uint16_t numberLower, boolean leadingZeros=true, AlignTextType_e=TMAlignTextLeft) |
| Display an integer in a nibble (4 digits on display) | |
Public Member Functions inherited from TM1638plus_common | |
| void | displayBegin () |
| Begin method , sets pin modes and activate display. | |
| void | reset (void) |
| Reset / clear the display. | |
| void | brightness (uint8_t brightness) |
| Sets the brightness level of segments in display on a scale of brightness. | |
| uint8_t | getHFIN_DELAY () const |
| void | setHFIN_DELAY (uint8_t delay) |
| uint8_t | getHFOUT_DELAY () const |
| void | setHFOUT_DELAY (uint8_t delay) |
Additional Inherited Members | |
Public Types inherited from CommonData | |
| enum | DecimalPoint_e : uint8_t { DecPointOff = 0 , DecPointOn = 1 } |
| Decimal point on digit control. More... | |
Public Attributes inherited from CommonData | |
| bool | displaylib_LED_debug = false |
Static Public Attributes inherited from CommonData | |
| static constexpr uint16_t | displaylib_LED_VersionNum = 220 |
Protected Member Functions inherited from TM1638plus_common | |
| uint8_t | HighFreqshiftin (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) |
| Shifts in a byte of data from the Tm1638 SPI-like bus. | |
| void | HighFreqshiftOut (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) |
| Shifts out a byte of data on to the Tm1638 SPI-like bus. | |
| void | sendCommand (uint8_t value) |
| Send command to display. | |
| void | sendData (uint8_t data) |
| Send Data to display. | |
Static Protected Member Functions inherited from SevenSegmentFont | |
| static const uint8_t * | pFontSevenSegptr () |
| Retrieves a pointer to the seven-segment font data table. | |
Protected Attributes inherited from TM1638plus_common | |
| uint8_t | _STROBE_IO |
| uint8_t | _DATA_IO |
| uint8_t | _CLOCK_IO |
| bool | _HIGH_FREQ = false |
| uint8_t | _HFIN_DELAY = 1 |
| uint8_t | _HFOUT_DELAY = 1 |
Static Protected Attributes inherited from TM1638plus_common | |
| static constexpr uint8_t | TM_ACTIVATE = 0x8F |
| static constexpr uint8_t | TM_BUTTONS_MODE = 0x42 |
| static constexpr uint8_t | TM_WRITE_LOC = 0x44 |
| static constexpr uint8_t | TM_WRITE_INC = 0x40 |
| static constexpr uint8_t | TM_SEG_ADR = 0xC0 |
| static constexpr uint8_t | TM_LEDS_ADR = 0xC1 |
| static constexpr uint8_t | TM_BRIGHT_ADR = 0x88 |
| static constexpr uint8_t | TM_BRIGHT_MASK = 0x07 |
| static constexpr uint8_t | TM_DEFAULT_BRIGHTNESS = 0x02 |
| static constexpr uint8_t | TM_DISPLAY_SIZE = 8 |
Static Protected Attributes inherited from SevenSegmentFont | |
| static constexpr uint8_t | _ASCII_FONT_OFFSET = 0x20 |
| static constexpr uint8_t | _ASCII_FONT_END = 0x7B |
| static constexpr uint8_t | _ASCII_FONT_HEX_OFFSET = 0x10 |
| static constexpr uint8_t | DEC_POINT_7_MASK = 0x80 |
Class for Model 1 tm1638.
| TM1638plus::TM1638plus | ( | uint8_t | strobe, |
| uint8_t | clock, | ||
| uint8_t | data, | ||
| bool | highfreq | ||
| ) |
Constructor for class TM1638plus.
| strobe | GPIO STB pin |
| clock | GPIO CLK pin |
| data | GPIO DIO pin |
| highfreq | Changes the value of parameter _HIGH_FREQ which is default false. |
| void TM1638plus::display7Seg | ( | uint8_t | position, |
| uint8_t | value | ||
| ) |
Send seven segment value to seven segment.
| position | The position on display 0-7 |
| value | byte of data corresponding to segments (dp)gfedcba |
| void TM1638plus::displayASCII | ( | uint8_t | position, |
| uint8_t | ascii, | ||
| DecimalPoint_e | decimalPoint | ||
| ) |
Display an ASCII character on display.
| position | The position on display 0-7 |
| ascii | The ASCII value from font table to display |
| decimalPoint | decimal point or off on the digit. |
| void TM1638plus::DisplayDecNumNibble | ( | uint16_t | numberUpper, |
| uint16_t | numberLower, | ||
| boolean | leadingZeros = true, |
||
| AlignTextType_e | TextAlignment = TMAlignTextLeft |
||
| ) |
Display an integer in a nibble (4 digits on display)
| numberUpper | upper nibble integer 2^16 |
| numberLower | lower nibble integer 2^16 |
| leadingZeros | leading zeros set, true on , false off |
| TextAlignment | left or right text alignment on display |
| void TM1638plus::displayHex | ( | uint8_t | position, |
| uint8_t | hex | ||
| ) |
Send Hexadecimal value to seven segment.
| position | The position on display 0-7 |
| hex | hexadecimal value (DEC) 0-15 (0x00 - 0x0F) |
| void TM1638plus::displayIntNum | ( | unsigned long | number, |
| boolean | leadingZeros = true, |
||
| AlignTextType_e | TextAlignment = TMAlignTextLeft |
||
| ) |
Display an integer and leading zeros optional.
| number | integer to display 2^32 |
| leadingZeros | leading zeros set, true on , false off |
| TextAlignment | left or right text alignment on display |
| void TM1638plus::displayText | ( | const char * | text | ) |
Display a text string on display.
| text | pointer to a character array |
| uint8_t TM1638plus::readButtons | ( | void | ) |
Read buttons values from display.
|
virtual |
Set ONE LED on or off Model 1 & 3.
| position | 0-7 == L1-L8 on PCB |
| value | 0 off 1 on |
Reimplemented in TM1638plus_model3.
|
virtual |
Set all LED's on or off Model 1 & 3.
| ledvalues | 1 on , 0 off , 0xXXLL where LL = L8-L1 |
Reimplemented in TM1638plus_model3.