I've been doing the time counter with TM1637 with this library <TM1637.h> . The time counter works fine but it won't display the colon on module. I tried almost everything that I got but still can't get to it. So I might need your help.
Here is my code.
#include <TM1637.h>
#include <TM1637Display.h>
#define CLK 2
#define DIO 3
float millisec = 0;
float sec = 0;
TM1637Display display(CLK,DIO);
TM1637 tm(CLK,DIO);
void setup() {
display.setBrightness(0.5); // กำหนดความสว่างของ display ตั้งแต่ 1-7
Serial.begin(9600);
}
void loop() {
sec = millis();
millisec = millis(); // millis() is the function that returns the number of milliseconds passed since the Arduino board began running the current program.
display.showNumberDec(millisec, false ,3,2); // showNumberDecEx(number,dots,leading_zeros,length,position)
display.showNumberDec(sec/1000, false,2,0); // sec คือเอาค่า millisec หาร 1000 จะได้ค่าเป็นวินาที วางไว้ที่สองหน่วยแรก
}