wokwi-tm1637-7segment Reference
Seven segment LED display module with TM1637 4-wire interface
Pin names
| Name | Description |
|---|---|
| CLK | Clock input |
| DIO | Data input * |
| VCC | Supply voltage |
| GND | Ground |
* The DIO pin is also used for acknowledging the data received from the microcontroller, by pulling it down at a specific clock cycle.
Attributes
| Name | Description | Default value |
|---|---|---|
| color | The color of the segment LEDs | "red" |
| type | "colon" for the module with a colon between the digits, "dp" for the module with a decimal point on each digit | "colon" |
Using the 7-segment display
This variant of the seven segment display uses the TM1637 chip. You'll only need 2 microcontroller pins to communicate with it.
The module comes in two forms: one with a colon between the second and third digits (common on clock modules), and one with a decimal point after each digit. Set the type attribute to "dp" for the decimal point module. Bit 7 (the DP segment) of a digit byte lights the colon on the colon module, and that digit's decimal point on the "dp" module.
The TM1637 communication protocol is non-standard. It resembles the I2C protocol, but it is simpler and incompatible with I2C. Luckily, you can use a library and not worry about the implementation of the protocol. Here are some TM1637 libraries you can use on Arduino: RT1637_RT(https://github.com/RobTillaart/TM1637_RT), Grove 4-Digit Display.