#include <TM1637Display.h>
// Define the common CLK pin connected to all displays
#define CLK_PIN 2
// Define the DIO pins for each display
#define DIO_PIN_1 3
#define DIO_PIN_2 4
#define DIO_PIN_3 5
#define DIO_PIN_4 6
#define DIO_PIN_5 7
// Create instances of the TM1637Display for each display
TM1637Display display1(CLK_PIN, DIO_PIN_1);
TM1637Display display2(CLK_PIN, DIO_PIN_2);
TM1637Display display3(CLK_PIN, DIO_PIN_3);
TM1637Display display4(CLK_PIN, DIO_PIN_4);
TM1637Display display5(CLK_PIN, DIO_PIN_5);
void setup() {
// Set the display brightness for all displays (0-7)
display1.setBrightness(7);
display2.setBrightness(7);
display3.setBrightness(7);
display4.setBrightness(7);
display5.setBrightness(7);
}
void loop() {
// Display different numbers on each display
int number1 = 1234;
int number2 = 5678;
int number3 = 9876;
int number4 = 5432;
int number5 = 1111;
// Display numbers on each display
display1.showNumberDec(number1);
display2.showNumberDec(number2);
display3.showNumberDec(number3);
display4.showNumberDec(number4);
display5.showNumberDec(number5);
// Add a delay to display the numbers (you can change this as needed)
delay(1000); // Display for 1 second on all displays
// Clear all displays
display1.clear();
display2.clear();
display3.clear();
display4.clear();
display5.clear();
// Add any additional code or functionality here
}