TM1638 class.
More...
#include <ErriezTM1638.h>
|
| TM1638 (uint8_t clkPin, uint8_t dioPin, uint8_t stbPin, bool displayOn=true, uint8_t brightness=5) |
| TM1638 constructor. More...
|
|
virtual void | begin () |
| Initialize TM1638 controller.
|
|
virtual void | end () |
| Disable pins.
|
|
virtual void | displayOn () |
| Turn Display on.
|
|
virtual void | displayOff () |
| Turn display off.
|
|
virtual void | setBrightness (uint8_t brightness) |
| Set brightness LED's. More...
|
|
virtual void | clear () |
| Turn all LED's off.
|
|
virtual void | writeData (uint8_t address, uint8_t data) |
| Write display register. More...
|
|
virtual void | writeData (uint8_t address, const uint8_t *buf, uint8_t len) |
| Write buffer to multiple display registers. More...
|
|
virtual uint32_t | getKeys () |
| Get key states. More...
|
|
|
uint8_t | _clkPin |
| Clock pin.
|
|
uint8_t | _dioPin |
| Data pin.
|
|
uint8_t | _stbPin |
| Enable pin.
|
|
bool | _displayOn |
| Display on and off status for display control register.
|
|
uint8_t | _brightness |
| Display brightness for display control register.
|
|
TM1638 class.
Definition at line 154 of file ErriezTM1638.h.
◆ TM1638()
TM1638::TM1638 |
( |
uint8_t |
clkPin, |
|
|
uint8_t |
dioPin, |
|
|
uint8_t |
stbPin, |
|
|
bool |
displayOn = true , |
|
|
uint8_t |
brightness = 5 |
|
) |
| |
TM1638 constructor.
Constructor with pin arguments: C-D-E (Clock, Data, Enable)
- Parameters
-
Definition at line 43 of file ErriezTM1638.cpp.
◆ getKeys()
uint32_t TM1638::getKeys |
( |
| ) |
|
|
virtual |
Get key states.
- Returns
- One or more buttons. One bit per button.
Definition at line 190 of file ErriezTM1638.cpp.
◆ readByte()
uint8_t TM1638::readByte |
( |
| ) |
|
|
protectedvirtual |
◆ setBrightness()
void TM1638::setBrightness |
( |
uint8_t |
brightness | ) |
|
|
virtual |
Set brightness LED's.
- Parameters
-
brightness | Display brightness value 0..7 |
Definition at line 124 of file ErriezTM1638.cpp.
◆ writeByte()
void TM1638::writeByte |
( |
uint8_t |
data | ) |
|
|
protectedvirtual |
◆ writeData() [1/2]
void TM1638::writeData |
( |
uint8_t |
address, |
|
|
uint8_t |
data |
|
) |
| |
|
virtual |
Write display register.
- Parameters
-
address | Display address 0x00..0x0F |
data | Value 0x00..0xFF |
Definition at line 151 of file ErriezTM1638.cpp.
◆ writeData() [2/2]
void TM1638::writeData |
( |
uint8_t |
address, |
|
|
const uint8_t * |
buf, |
|
|
uint8_t |
len |
|
) |
| |
|
virtual |
Write buffer to multiple display registers.
Write buffer to TM1638 with auto address increment
- Parameters
-
address | Display address 0x00..0x0F |
buf | Buffer |
len | Buffer length |
Definition at line 173 of file ErriezTM1638.cpp.
◆ writeDisplayControl()
void TM1638::writeDisplayControl |
( |
| ) |
|
|
protectedvirtual |
Write display control register.
Set brightness and display on/off
Definition at line 211 of file ErriezTM1638.cpp.
The documentation for this class was generated from the following files: