| 
    upm
    0.3.2
    
   Sensor/Actuator repository for libmraa (v0.7.2) 
   | 
 
API for the TM1637 7-Segment Display. More...
TM1637 is a display controller for LED-based 7-segment displays. It can be used to address and write data to multiple display digits. This driver is based on the Grove version of the TM1637 display that uses 4 digits, thus making it ideal for clock displays, timers, counters, or even score displays in a two-player arcade game.
Public Types | |
| enum | M_FAST_GPIO { NO = 0, YES = 1 } | 
Public Member Functions | |
| TM1637 (int clk_pin, int dio_pin, int bright=3, M_FAST_GPIO mmio=YES) | |
| ~TM1637 () | |
| mraa_result_t | write (uint8_t *digits) | 
| mraa_result_t | write (int d,...) | 
| mraa_result_t | writeAt (int index, char symbol) | 
| mraa_result_t | write (std::string digits) | 
| void | setColon (bool value) | 
| void | setBrightness (int value) | 
| TM1637 | ( | int | clk_pin, | 
| int | dio_pin, | ||
| int | bright = 3,  | 
        ||
| M_FAST_GPIO | mmio = YES  | 
        ||
| ) | 
TM1637 constructor
| clk_pin | Clock pin the sensor is connected to | 
| dio_pin | Data pin the sensor is connected to | 
| bright | Initial brightness, from 0 (dark) to 7 (bright) (default is 3) | 
| mmio | Fast memory-mapped GPIO writes; default is yes | 
| mraa_result_t write | ( | uint8_t * | digits | ) | 
Writes digits to the display in a 7-segment encoding
| digits | Array of digits to send to the display | 
| mraa_result_t write | ( | int | d, | 
| ... | |||
| ) | 
Writes digits to the display in a 7-segment encoding
| d | List of multiple arguments to send to the display | 
| mraa_result_t writeAt | ( | int | index, | 
| char | symbol | ||
| ) | 
Writes a symbol (digit or letter) to the display in a specified index
| index | 0-based index of the digit to change from the left | 
| symbol | Digit or letter to display | 
| mraa_result_t write | ( | std::string | digits | ) | 
Writes all the digits or letters to the display as a string
| digits | String of symbols to display | 
| void setColon | ( | bool | value | ) | 
Toggles the colon between digits on the display
| value | True to turn the colon on, false to turn it off | 
| void setBrightness | ( | int | value | ) | 
Controls the brightness of the display
| value | Brightness, from 0 (darkest) to 7 (brightest) | 
 1.8.9.1