From ca5ffc2b8467486988eac4ccfd5baa3aa455e072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien?= Date: Fri, 22 Dec 2017 12:27:08 +0100 Subject: [PATCH] Adding seconds in order to blink colon in time --- LibreMetric.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LibreMetric.ino b/LibreMetric.ino index 082bae4..a4d6135 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -79,8 +79,10 @@ void loop() { String time = String(ctime(&now)); time.trim(); time.substring(11,19).toCharArray(time_value, 10); + int seconds = time.substring(17,19).toInt(); + //Serial.println(seconds); for (int i = 0; i <= 4; i++) { - matrix.drawChar(i*6+2,0, time_value[i], HIGH,LOW,1); // H + if (i != 2 || seconds % 2 == 0) matrix.drawChar(i*6+2,0, time_value[i], HIGH,LOW,1); } matrix.write(); // Send bitmap to display if (message != "") {