Codey Online › Arduino- & ESP32-Komponentenbibliothek › TM1637 4-Digit Display
TM1637 4-Digit Display
Displays

TM1637 4-Digit Display

Das TM1637 4-stellige Display ist ein kleines Seven-Segment-LED-Modul zur Anzeige von Zahlenwerten und einfachen Symbolen. Es verwendet eine 2-Draht-TM1637-Serienschnittstelle mit CLK und DIO sowie VCC und GND zur Stromversorgung.

Breite: 46 mm

Pinbelegung — TM1637 4-Digit Display

Pin Signal Beschreibung
CLK clock TM1637 serial clock input from the microcontroller.
DIO data Bidirectional TM1637 serial data line to the microcontroller.
GND ground Ground reference for power and logic signals.
VCC power Positive supply for the display module, typically 3.3V or 5V.

Beispielschaltplan — TM1637 4-Digit Display

Von Nach Kabel
board:D2 x1:CLK green
board:D3 x1:DIO blue
board:5V x1:VCC red
board:GND x1:GND black

Arduino-Beispielcode — TM1637 4-Digit Display

Dieses Beispiel wurde für das arduino-uno geschrieben und kompiliergeprüft. Codey Online passt es für jedes andere unterstützte Board an.

#include <TM1637Display.h>

const int CLK_PIN = 2;
const int DIO_PIN = 3;

TM1637Display display(CLK_PIN, DIO_PIN);

void setup() {
  Serial.begin(9600);
  display.setBrightness(7);  // 0 to 7
  display.clear();

  Serial.println("TM1637 4-digit display example");
  Serial.println("Showing a counter on the display.");
}

void loop() {
  static unsigned int counter = 0;

  display.showNumberDec(counter, false);  // no leading zeros

  Serial.print("Counter: ");
  Serial.println(counter);

  counter++;
  if (counter > 9999) {
    counter = 0;
  }

  delay(1000);
}

Ähnliche Komponenten

1.28" Round TFT LCD 240x240 (GC9A01, SPI)

1.28" Round TFT LCD 240x240 (GC9A01, SPI)

1602 LCD DISPLAY

1602 LCD DISPLAY

1602 LCD I2C DISPLAY

1602 LCD I2C DISPLAY

8x8 RGB 64 LED Matrix 5V WS2812b

8x8 RGB 64 LED Matrix 5V WS2812b

Bau dein Arduino- oder ESP32-Projekt mit AI

Beschreib einfach, was du bauen willst. Codey Online schreibt den Code, zeichnet den Schaltplan, kompiliert alles und flasht dein Board direkt aus dem Browser.

Kostenlos starten