Horloge simple

Description

Seul un afficheur LCD suffit.

Author: Lucas095

#include "Screen.h"

int HH_Depart;

int MM_Depart;

Screen LCD1;

void setup()
{
  HH_Depart = 23;

  MM_Depart = 59;

}


void loop()
{
  LCD1.switchOn();
  for ( int Heures = HH_Depart;
      (HH_Depart <= 23) ? Heures <= 23 : Heures >= 23;
      Heures += (HH_Depart <= 23) ? 1 : -1) {
    for ( int Minutes = MM_Depart;
        (MM_Depart <= 59) ? Minutes <= 59 : Minutes >= 59;
        Minutes += (MM_Depart <= 59) ? 1 : -1) {
      for ( int Secondes = 0; Secondes <= 59; Secondes++) {
        LCD1.printMsg("Bonjour il est ",0);
        LCD1.printMsg(String(String(Heures)+String(String(":")+String(Minutes)))+String(String(":")+String(Secondes)),2);
        attendre(1000);
      }
    }
  }
  HH_Depart = 0;
  MM_Depart = 0;

}