Lower brightness and reconnect when wifi connection is lost

parent b70f8769
......@@ -57,9 +57,8 @@ void writeTime() {
void setup() {
Serial.begin(9600);
matrix.begin(0x70); // 0x70 is the I2C address of the display
matrix.write(10000); // clearing the display
matrix.setBrightness(10);
connectWifi();
......@@ -69,8 +68,10 @@ void setup() {
timeClient.begin();
}
void loop() {
if (WiFi.status() != WL_CONNECTED) {
connectWifi();
}
timeClient.update();
writeTime();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment