#include <TM1637.h>
#include <NTPClient.h>
#include <WiFi.h>
TM1637 TM1;
int clockSeconds; // the seconds counter for the first display
int clockMinutes;
bool colon = false;
short brt = 0;
float zz = 3.168;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
// -----------------------------------------
TM1.begin(2, 0, 4); // clockpin, datapin, #digits
TM1.displayClear();
TM1.setBrightness(brt); // full brightness, default is 3
}
void loop() {
// put your main code here, to run repeatedly:
//Serial.println(brt);
//zz = round(zz,1);
Serial.println(zz, 1);
TM1.setBrightness(brt);
TM1.displayTime(brt,clockSeconds, colon);
colon = !colon;
brt +=1;
if(brt >7) {brt = 0;}
delay(1000); // this speeds up the simulation
}