The TM1637 module is the cheapest clock-style display: four 7-segment digits with a colon, driven over two wires. It suits a SuperMini kitchen timer or an NTP clock.
Wire CLK to GPIO6 and DIO to GPIO7 and power it from 3V3. The sketch shows uptime as MM:SS and blinks the colon every second — swap in NTP time once Wi-Fi is set up.
Wiring
| ESP32-C3 SuperMini | TM1637 4-digit 7-segment display | Wire | Notes |
|---|---|---|---|
| 3V3 | VCC | red | Bright enough indoors; the module’s pull-ups then sit at 3.3 V. |
| GND | GND | black | |
| 6 | CLK | yellow | |
| 7 | DIO | blue |
3.3–5 V part, 3.3 V board. Works from 3.3 V or 5 V — power it from your board’s logic voltage so CLK/DIO stay in range. At 3.3 V the digits are a little dimmer.
Board quirks
- CLK/DIO are not I2C even though they look like it — any two GPIOs work. GPIO6/7 avoid the strapping pins (2/8/9) and the UART pins (20/21).
- Powered from 3V3 the module’s pull-ups go to 3.3 V, so nothing above 3.3 V reaches the C3. If you power it from 5V for more brightness, the pull-ups put 5 V on CLK/DIO — then add a level shifter.
- Brightness 4 of 7 is plenty indoors and keeps the current (up to ~80 mA at full) off the SuperMini’s small regulator.
Code
// TM1637 4-digit 7-segment display on an ESP32-C3 SuperMini — shows uptime as MM:SS.
// VCC → 3V3, GND → GND, CLK → GPIO6, DIO → GPIO7.
// At 3V3 the module's pull-ups go to 3.3 V, so no level shifting is needed.
#include <TM1637Display.h>
constexpr uint8_t CLK_PIN = 6;
constexpr uint8_t DIO_PIN = 7;
TM1637Display display(CLK_PIN, DIO_PIN);
void setup() {
Serial.begin(115200);
delay(1500); // let the native USB serial port enumerate
display.setBrightness(4); // 0–7
display.clear();
Serial.println("TM1637: CLK GPIO6, DIO GPIO7 — showing uptime MM:SS");
}
void loop() {
uint32_t s = millis() / 1000;
int mmss = (s / 60 % 100) * 100 + s % 60;
bool colon = s % 2 == 0; // blink the colon once a second
display.showNumberDecEx(mmss, colon ? 0b01000000 : 0, true);
static uint32_t last = 0;
if (s != last) {
last = s;
Serial.printf("%02d:%02d\n", mmss / 100, mmss % 100);
}
delay(100);
}// TM1637 4-digit 7-segment display on an ESP32-C3 SuperMini — shows uptime as MM:SS.
// VCC → 3V3, GND → GND, CLK → GPIO6, DIO → GPIO7.
// At 3V3 the module's pull-ups go to 3.3 V, so no level shifting is needed.
#include <TM1637Display.h>
constexpr uint8_t CLK_PIN = 6;
constexpr uint8_t DIO_PIN = 7;
TM1637Display display(CLK_PIN, DIO_PIN);
void setup() {
Serial.begin(115200);
delay(1500); // let the native USB serial port enumerate
display.setBrightness(4); // 0–7
display.clear();
Serial.println("TM1637: CLK GPIO6, DIO GPIO7 — showing uptime MM:SS");
}
void loop() {
uint32_t s = millis() / 1000;
int mmss = (s / 60 % 100) * 100 + s % 60;
bool colon = s % 2 == 0; // blink the colon once a second
display.showNumberDecEx(mmss, colon ? 0b01000000 : 0, true);
static uint32_t last = 0;
if (s != last) {
last = s;
Serial.printf("%02d:%02d\n", mmss / 100, mmss % 100);
}
delay(100);
}Library: TM1637 (Avishay Orpaz) — compiled with TM1637 1.2.0.
Expected serial output
TM1637: CLK GPIO6, DIO GPIO7 — showing uptime MM:SS
00:01
00:02
00:03TM1637: CLK GPIO6, DIO GPIO7 — showing uptime MM:SS 00:01 00:02 00:03
Common errors
Display stays blank
CLK and DIO swapped, or VCC/GND reversed on the 4-pin header. Swap the two signal pins in the code first.
Random segments flicker
Long jumper wires. Keep them under 20 cm.