28 #include <mraa/gpio.h>
30 #define SEG_A 0b00000001
31 #define SEG_B 0b00000010
32 #define SEG_C 0b00000100
33 #define SEG_D 0b00001000
34 #define SEG_E 0b00010000
35 #define SEG_F 0b00100000
36 #define SEG_G 0b01000000
38 #define TM1637_I2C_COMM1 0x40
39 #define TM1637_I2C_COMM2 0xC0
40 #define TM1637_I2C_COMM3 0x80
42 #define PULSE_LENGTH 50
73 TM1637 (uint8_t di, uint8_t dcki);
95 mraa_result_t
setSegments (
const uint8_t segments[], uint8_t length = 4, uint8_t pos = 0);
102 mraa_result_t
write (std::string msg);
113 mraa_result_t start();
114 mraa_result_t stop();
115 mraa_result_t writeByte (uint8_t value);
116 mraa_result_t pinMode (mraa_gpio_context ctx, gpio_dir_t mode);
118 mraa_gpio_context m_clkPinCtx;
119 mraa_gpio_context m_dataPinCtx;
122 uint8_t m_brightness;
mraa_result_t setBrightness(uint8_t level)
Definition: tm1637.cxx:99
std::string name()
Definition: tm1637.h:107
C++ API for Seven segments screen.
Definition: tm1637.h:65
~TM1637()
Definition: tm1637.cxx:86
mraa_result_t setSegments(const uint8_t segments[], uint8_t length=4, uint8_t pos=0)
Definition: tm1637.cxx:104
mraa_result_t write(std::string msg)
Definition: tm1637.cxx:122
TM1637(uint8_t di, uint8_t dcki)
Definition: tm1637.cxx:53