#include "TM1637.h" #define CLK 3 // pins definitions for TM1637 and can be changed to other ports #define DIO 2 TM1637 tm1637(CLK, DIO); void setup() { tm1637.init(); tm1637.set(BRIGHT_TYPICAL); // BRIGHT_TYPICAL = 2, BRIGHT_DARKEST = 0, BRIGHTEST = 7; } void loop() { delay(2000); tm1637.point(1); // 显示中间的分号 tm1637.display(0, 1); // 控制每一位数码管的显示 tm1637.display(1, 2); tm1637.display(2, 3); tm1637.display(3, 4); delay(2000); }