Adding seconds in order to blink colon in time
This commit is contained in:
parent
0e8754512a
commit
ca5ffc2b84
@ -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 != "") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user