meta data for this page
lamaPLC: TM1637 7-segment display
The TM1637 module is a driver for 4-digit 7-segment displays. These chips are standard in inexpensive display units. They communicate with the processor using an I²C-like protocol. The implementation relies entirely on software emulation and uses no specialized hardware, aside from GPIO pins. It is assumed that pull-up resistors are present, typically integrated into the display module.
- Operating voltage: 3.3 – 5 V DC
- Maximum current draw: 80mA
- Reverse polarity protection: Yes
Wiring Diagram
| TM1637 Pin | Arduino | Pin Description |
|---|---|---|
| GND | GND | Ground |
| VCC | 5V or 3.3V Power | (3.3V–5.25V DC) |
| DIO | Digital Pin 3 | Data Input/Output (configurable) |
| CLK | Digital Pin 2 | Clock Input (configurable) |
If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.
Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.
Required Library
Install the TM1637Display library by Avishay Orpaz through the Arduino IDE Library Manager (Sketch > Include Library > Manage Libraries…)
Arduino code
This code initializes the display, sets the brightness, and loops through a simple counter.
#include <TM1637Display.h> // Define the connections #define CLK 2 #define DIO 3 // Create a display object TM1637Display display(CLK, DIO); void setup() { display.setBrightness(0x0f); // Set brightness (0x00 to 0x0f) display.clear(); // Clear the display } void loop() { // Show a static number display.showNumberDec(1234); delay(2000); // Counter loop for (int i = 0; i <= 100; i++) { display.showNumberDec(i); delay(100); } display.clear(); delay(1000); }
Sources
Sensor topics on lamaPLC
This page has been accessed for: Today: 2, Until now: 49
