Ho fatto diversi tentativi e quello che si avvicina alla soluzione
get_date_DS1307(&second, &minute, &hour, &day_of_week, &day_of_month, &month, &year, &sqwe, &bst_flag);
// Captures the current time from the Maxim clock IC
if (hour<10 ){
- led_print(hour, 6);*
- lc.setRow(chip_id, 7, 0);*
- }*
- else*
- led_print(hour, 6); // Print the hour*
//if(hour[0] == '0') hour[0] = ' ';
//led_print(hour, 6);
lc.setChar(chip_id, 5, '-', false); // Print the divider
led_print(minute, 3); // Now the minutes
lc.setChar(chip_id, 2, '-', false); // Another divider
led_print(second, 0); // And the seconds just to make it look exciting!
In effetti il display si spegne ma non in modo stabile, infatti emette dei lievi ma percettibili flash (tenta di visualizzare lo 0) ed è evidente che questa soluzione non è perfetta. La riga di comando suggerita mi da errore e probabilmente va incastrata meglio nel codice generale.
Saluti.