TM1637 Class
- ID: tm1637
- Name: 7-segment Display
- Other Names: Grove 4-Digit Display
- Category: display
- Manufacturer: seeed
- Link: http://wiki.seeed.cc/Grove-4-Digit_Display/
- Connection: gpio
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.

Methods
TM1637
-
clk_pin -
dio_pin -
bright
TM1637 constructor
Parameters:
-
clk_pinNumberClock pin the sensor is connected to
-
dio_pinNumberData pin the sensor is connected to
-
brightNumberInitial brightness, from 0 (dark) to 7 (bright) (default is 3)
Returns:
write
-
digits
Writes digits to the display in a 7-segment encoding
Parameters:
-
digitsUint8_t *Array of digits to send to the display
Returns:
0 if successful, error code otherwise
write
-
d -
arguments
Writes digits to the display in a 7-segment encoding
Parameters:
-
dNumberList of multiple arguments to send to the display
-
arguments...undefined
Returns:
0 if successful, error code otherwise
writeAt
-
index -
symbol
Writes a symbol (digit or letter) to the display in a specified index
Parameters:
-
indexNumber0-based index of the digit to change from the left
-
symbolStringDigit or letter to display
Returns:
0 if successful, error code otherwise
write
-
digits
Writes all the digits or letters to the display as a string
Parameters:
-
digitsStringString of symbols to display
Returns:
0 if successful, error code otherwise
setColon
-
value
Toggles the colon between digits on the display
Parameters:
-
valueBooleanTrue to turn the colon on, false to turn it off
setBrightness
-
value
Controls the brightness of the display
Parameters:
-
valueNumberBrightness, from 0 (darkest) to 7 (brightest)