// **************************************** affichage heure
tft.setTextColor(TFT_BLUE,TFT_BLACK);
tft.setTextSize(5);
tft.setCursor(20 , 10);
if (now.hour()<10){
  tft.print("0");
  }
tft.print(now.hour());
tft.print(":");
if (now.minute()<10){
  tft.print("0");
  }
tft.print(now.minute());
tft.setTextSize(2);
tft.print(":");
if (now.second()<10){
  tft.print("0");
  }
tft.println(now.second());


// **************************************** affichage ds18b20 + icone
tfttermo = ((24 - tempbac)*24)+100 ;
if(tfttermo<5){
  tfttermo=4;
  }
else if(tfttermo>100){
  tfttermo=100;
  }
else if (tfttermo>80){
  tft.fillRoundRect(368, 3, 15, (tfttermo-20), 5, TFT_WHITE);
  }
else{
  tft.fillRoundRect(368, 3, 15, tfttermo, 5, TFT_WHITE);
  }
tft.fillRoundRect(370, tfttermo, 11, (100-tfttermo), 5, TFT_RED);
tft.setCursor(395 , 20);
tft.setTextColor(TFT_RED,TFT_BLACK);
tft.setTextSize(3);
tft.print(tempbac,1);
tft.setTextSize(1);
tft.print("C");
if ((tempbac < 25)&&(img4==true)){
  img4 = !img4;
  drawBMP("alerte.bmp", 405, 60, BU_BMP);
  }
else if ((tempbac >= 25)&&(tempbac<26.7)&&(img4==false)){
  img4 = !img4;
  drawBMP("chauff.bmp", 405, 60, BU_BMP);
  }
else if ((tempbac>=26.7)&&(tempbac<27.5)&&(img4==true)){
  img4 = !img4;
  drawBMP("ventil.bmp", 405, 60, BU_BMP);
  }
else if ((tempbac>=27.5)&&(img4==false)){
  img4 = !img4;
  drawBMP("alerte.bmp", 405, 60, BU_BMP);    
  }


  // **************************************** affichage lm35
tft.setCursor(5 , 187);
tft.setTextColor(TFT_RED,TFT_BLACK);
tft.setTextSize(2);
tft.print(temprampe,1);
tft.setTextSize(1);
tft.print("C");


// **************************************** affichage eclairage
tft.setCursor(35 , 60);
tft.setTextColor(TFT_RED,TFT_BLACK);
tft.setTextSize(2);
tft.print("BLEU  :");
tft.setTextColor(TFT_GREEN,TFT_BLACK);
tft.print(((pwmbleu1+pwmbleu2)/2)/2.55,0);
tft.print("% ");
tft.setCursor(35 , 80 );
tft.setTextColor(TFT_RED,TFT_BLACK);
tft.print("BLANC :");
tft.setTextColor(TFT_GREEN,TFT_BLACK);
tft.print(((pwmblanc1+pwmblanc2)/2)/2.55,0);
tft.print("% ");


// **************************************** affichage pwm jabeo + anglo oscillo
tft.setCursor(82 , 250);
tft.setTextColor(TFT_RED,TFT_BLACK);
tft.setTextSize(2);
tft.print("RW15:");
tft.setTextColor(TFT_GREEN,TFT_BLACK);
if ((pwmjebao1/2.55)<100){
  tft.print(" ");
  }
tft.print(pwmjebao1/2.55,0);
tft.print("%");
tft.setCursor(82 , 267);
tft.setTextColor(TFT_YELLOW,TFT_BLACK);
tft.setTextSize(1);
tft.print ("angle: ");
tft.print(pososcillo1);
tft.print("  ");
tft.setCursor(82 , 290);
tft.setTextColor(TFT_RED,TFT_BLACK);
tft.setTextSize(2);
tft.print("RW8: ");
tft.setTextColor(TFT_GREEN,TFT_BLACK);
if ((pwmjebao2/2.55)<100){
  tft.print(" ");
  }
tft.print(pwmjebao2/2.55,0);
tft.print("%");
tft.setCursor(82 , 307);
tft.setTextColor(TFT_YELLOW,TFT_BLACK);
tft.setTextSize(1);
tft.print ("angle: ");
tft.print(pososcillo2);
tft.print("  ");

/////////////////////////////////////// *** INVERSION BOOLEAN 1ER LOOP *** ///////////////////////////////////////
if (img4bis == false){
  img4bis = true;
  if (img4==false){
    img4 = !img4;
    }
  if (img5==false){
    img5 = !img5;
    }
  }



