#include <TM1637Display.h>

#define CLK 5
#define DIO 4

#define RED_LED 25
#define YELLOW_LED 26
#define GREEN_LED 27

TM1637Display display(CLK, DIO);

void setup() {
  pinMode(RED_LED, OUTPUT);
  pinMode(YELLOW_LED, OUTPUT);
  pinMode(GREEN_LED, OUTPUT);

  display.setBrightness(0x0f);
}

void loop() {
  digitalWrite(RED_LED, HIGH);
  countdownTimer(60);
  digitalWrite(RED_LED, LOW);

  digitalWrite(YELLOW_LED, HIGH);
  countdownTimer(5);
  digitalWrite(YELLOW_LED, LOW);

  digitalWrite(GREEN_LED, HIGH);
  countdownTimer(60);
  digitalWrite(GREEN_LED, LOW);
}

void countdownTimer(int seconds) {
  for (int i = seconds; i >= 0; i--) {
    display.showNumberDec(i, true);
    delay(1000);
  }
}