Features:
- TM1637 Driver IC: Controls the display using simple 2-wire communication (CLK, DIO).
- 4-Digit Display: Common anode 7-segment red LED display.
- Brightness Control: Software-controlled brightness levels (0–7).
- Low Power: Operating current between 30 mA and 80 mA.
- Easy Integration: Compatible with 3.3V and 5V microcontrollers including Arduino, ESP32, and more.
Specifications:
- Chip: TM1637
- Display Type: Common anode 7-segment LED (red)
- Operating Voltage: 3.3V – 5V
- Current Consumption: 30 – 80 mA
- Size: 42 x 24 x 11 mm
Pinout:
Pin |
Name |
Description |
1 |
CLK |
Clock signal input |
2 |
DIO |
Data I/O |
3 |
VCC |
Power supply (3.3V–5V) |
4 |
GND |
Ground |
Arduino Library:
Wiring with Arduino:
- CLK → Arduino Digital Pin 2
- DIO → Arduino Digital Pin 3
- VCC → 5V
- GND → GND
Example Arduino Code:
#include "Arduino.h"
#include "TM1637Display.h"
#define CLK 2
#define DIO 3
#define TEST_DELAY 2000
const uint8_t SEG_DONE[] = {
SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, // d
SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // O
SEG_C | SEG_E | SEG_G, // n
SEG_A | SEG_D | SEG_E | SEG_F | SEG_G // E
};
TM1637Display display(CLK, DIO);
void setup() { }
void loop() {
uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
display.setBrightness(0x0f);
display.setSegments(data); // All segments ON
delay(TEST_DELAY);
data[0] = display.encodeDigit(0);
data[1] = display.encodeDigit(1);
data[2] = display.encodeDigit(2);
data[3] = display.encodeDigit(3);
display.setSegments(data);
delay(TEST_DELAY);
display.clear();
display.showNumberDec(301, false); // Show number without leading zeros
delay(TEST_DELAY);
display.showNumberDec(-999); // Show negative numbers
delay(TEST_DELAY);
display.clear();
display.showNumberHexEx(0xf1af); // Show hex
delay(TEST_DELAY);
// Brightness test
for (int i = 0; i < 7; i++) {
display.setBrightness(i);
display.setSegments(data);
delay(TEST_DELAY);
}
// Final message
display.setSegments(SEG_DONE); // Show "done"
while(1);
}
Features:
- TM1637 Driver IC: Controls the display using simple 2-wire communication (CLK, DIO).
- 4-Digit Display: Common anode 7-segment red LED display.
- Brightness Control: Software-controlled brightness levels (0–7).
- Low Power: Operating current between 30 mA and 80 mA.
- Easy Integration: Compatible with 3.3V and 5V microcontrollers including Arduino, ESP32, and more.
Specifications:
- Chip: TM1637
- Display Type: Common anode 7-segment LED (red)
- Operating Voltage: 3.3V – 5V
- Current Consumption: 30 – 80 mA
- Size: 42 x 24 x 11 mm
Pinout:
Pin |
Name |
Description |
1 |
CLK |
Clock signal input |
2 |
DIO |
Data I/O |
3 |
VCC |
Power supply (3.3V–5V) |
4 |
GND |
Ground |
Arduino Library:
Wiring with Arduino:
- CLK → Arduino Digital Pin 2
- DIO → Arduino Digital Pin 3
- VCC → 5V
- GND → GND
Example Arduino Code:
#include "Arduino.h"
#include "TM1637Display.h"
#define CLK 2
#define DIO 3
#define TEST_DELAY 2000
const uint8_t SEG_DONE[] = {
SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, // d
SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // O
SEG_C | SEG_E | SEG_G, // n
SEG_A | SEG_D | SEG_E | SEG_F | SEG_G // E
};
TM1637Display display(CLK, DIO);
void setup() { }
void loop() {
uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
display.setBrightness(0x0f);
display.setSegments(data); // All segments ON
delay(TEST_DELAY);
data[0] = display.encodeDigit(0);
data[1] = display.encodeDigit(1);
data[2] = display.encodeDigit(2);
data[3] = display.encodeDigit(3);
display.setSegments(data);
delay(TEST_DELAY);
display.clear();
display.showNumberDec(301, false); // Show number without leading zeros
delay(TEST_DELAY);
display.showNumberDec(-999); // Show negative numbers
delay(TEST_DELAY);
display.clear();
display.showNumberHexEx(0xf1af); // Show hex
delay(TEST_DELAY);
// Brightness test
for (int i = 0; i < 7; i++) {
display.setBrightness(i);
display.setSegments(data);
delay(TEST_DELAY);
}
// Final message
display.setSegments(SEG_DONE); // Show "done"
while(1);
}