#include <TM1637Display.h>
// Define the connections pins
#define CLK 3
#define DIO 4
// Create a display object of type TM1637Display
TM1637Display display = TM1637Display(CLK, DIO);
// Create an array that turns all segments ON
const uint8_t allON[] = {0xff, 0xff, 0xff, 0xff};
// Create an array that turns all segments OFF
const uint8_t allOFF[] = {0x00, 0x00, 0x00, 0x00};
void setup() {
}
void loop() {
// Set the brightness to 5 (0=dimmest 7=brightest)
display.setBrightness(7);
// Set all segments ON
display.setSegments(allON);
delay(4000);
display.clear();
// Show counter 0-9
int i;
for (i = 0; i < 100; i++) {
display.showNumberDec(i);
delay(1000);
}
delay(4000);
display.clear();
while(1);
}