diff --git a/LibreMetric.ino b/LibreMetric.ino index 2fc254f..d72d4bf 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -87,7 +87,6 @@ void setup() { // At this stage the WiFi manager will have successfully connected to a network, or if not will try again in 180-seconds DEBUG_PRINTLN(F("WiFi connected...")); display_static_message("OK"); - delay(10*wait); DEBUG_PRINTLN(WiFi.localIP()); configTime(timezone * 3600, dstOffset * 3600, ntpServer); // First sync of time with (S)NTP @@ -131,7 +130,7 @@ void loop() { DEBUG_PRINT(F("On envoi \"")); DEBUG_PRINT(message); DEBUG_PRINTLN(F("\" à LibreMetric")); - display_message(message); // Display the message + display_static_message(message); // Display the message DEBUG_PRINT(F("Message envoyé à LibreMetric : ")); DEBUG_PRINTLN(message); message = ""; @@ -147,6 +146,7 @@ void loop() { yield(); } void display_static_message(String message){ + matrix.fillScreen(LOW); if (width * message.length() - spacer > matrix.width()) { display_message(message); } @@ -157,6 +157,7 @@ void display_static_message(String message){ matrix.drawChar(x + (i * width), y, message[i], HIGH, LOW, 1); // HIGH LOW means foreground ON, background OFF, reverse these to invert the display! } matrix.write(); // Send bitmap to display + delay(15*wait); } } void display_message(String message){