#include <Arduino.h>
#include <TM1637Display.h>
// Module connection pins (Digital Pins)
#define CLK 2
#define DIO 3
// The amount of time (in milliseconds) between tests
#define TEST_DELAY 100
const uint8_t SEG_DONE[] = {
SEG_F | SEG_C | SEG_D | SEG_E | SEG_G, // b
SEG_G | SEG_B | SEG_C | SEG_D | SEG_F, // y
SEG_A | SEG_D| SEG_F | SEG_E | SEG_G, // E
};
TM1637Display display(CLK, DIO);
void setup()
{
int m;
uint8_t data[] = {0x00, 0x00, 0x00, 0x00};
uint8_t blank[] = {0x00, 0x00, 0x00, 0x00};
display.setBrightness(0x0f);
}
void loop()
{
int s,m;
for (m = 0; m <= 59; m++)
{
display.setSegments(0,1,1);
display.showNumberDec(m,true);
delay(TEST_DELAY);
for (s = 1; s <= 59; s++)
{
display.setSegments(s,0,0);
display.showNumberDec(s,true);
}
delay(TEST_DELAY);
}
}