     openSides();
   }
 //Programme fournaise1
-  if (greenhouseTemperature < (TEMP_CHAUFFAGE1-(HYST_CHAUFFAGE1/2))){
+  if (greenhouseTemperature < (TEMP_FOURNAISE1-(HYST_FOURNAISE1/2))){
     setHeater1(ON);
     digitalWrite(CHAUFFAGE1, ON);
-  }else if(greenhouseTemperature > (TEMP_CHAUFFAGE1+(HYST_CHAUFFAGE1/2))){
+  }else if(greenhouseTemperature > (TEMP_FOURNAISE1+(HYST_FOURNAISE1/2))){
     setHeater1(OFF);
     digitalWrite(CHAUFFAGE1, OFF);
   }
 //Programme fournaise2
-  if (greenhouseTemperature < (TEMP_CHAUFFAGE2-(HYST_CHAUFFAGE2/2))){
+  if (greenhouseTemperature < (TEMP_FOURNAISE2-(HYST_FOURNAISE2/2))){
     setHeater2(ON);
     digitalWrite(CHAUFFAGE2, ON);
-  }else if(greenhouseTemperature > (TEMP_CHAUFFAGE2+(HYST_CHAUFFAGE2/2))){
+  }else if(greenhouseTemperature > (TEMP_FOURNAISE2+(HYST_FOURNAISE2/2))){
     setHeater2(OFF);
     digitalWrite(CHAUFFAGE2, OFF);
   }
 //Programme ventilation forcée
-   if (greenhouseTemperature > (TEMP_VENT - (HYST_VENT/2))){
+   if (greenhouseTemperature > (TEMP_VENTILATION - (HYST_VENT/2))){
     setFan(ON);
     digitalWrite(FAN, ON);
-  }else if(greenhouseTemperature < (TEMP_VENT + (HYST_VENT/2))){
+  }else if(greenhouseTemperature < (TEMP_VENTILATION + (HYST_VENT/2))){
     setFan(OFF);
     digitalWrite(FAN, OFF);
   }
 //--------------Affichage sériel--------------------
-    Serial.println("");
-    Serial.println("-----------------------");
+    Serial.println(F(""));
+    Serial.println(F("-----------------------"));
     Serial.print(rtc.getDOWStr());
-    Serial.print(",  ");
+    Serial.print(F(",  "));
     // Send date
     Serial.print(rtc.getDateStr());
-    Serial.print(" - ");
+    Serial.print(F(" - "));
     // Send time
     Serial.println(rtc.getTimeStr());
-    Serial.print("PROGRAMME : ");
+    Serial.print(F("PROGRAMME : "));
     Serial.println(PROGRAMME);
   
-    Serial.println("-----------------------");    
-    Serial.print("Temperature cible :");
+    Serial.println(F("-----------------------"));    
+    Serial.print(F("Temperature cible :"));
     Serial.print(TEMP_CIBLE);
-    Serial.println(" C");
-
-    Serial.print("Temperature actuelle: ");
+    Serial.println(F(" C"));
+
+    Serial.print(F("Temperature actuelle: "));
     Serial.print(greenhouseTemperature);
     Serial.println(" C");
-    Serial.print("Humidite: ");
+    Serial.print(F("Humidite: "));
     Serial.print(greenhouseHumidity);
-    Serial.println("%");
-    Serial.println("-----------------------"); 
+    Serial.println(F("%"));
+    Serial.println(F("-----------------------")); 
     if(fan == false){
-    Serial.println("FAN: OFF");}
+    Serial.println(F("FAN: OFF"));}
     else if(fan == true){
-    Serial.println("FAN: ON");}
+    Serial.println(F("FAN: ON"));}
     if(heating1 == false){
-    Serial.println("HEATING1: OFF");}
+    Serial.println(F("HEATING1: OFF"));}
     else if(heating1 == true){
-    Serial.println("HEATING1: ON");}
+    Serial.println(F("HEATING1: ON"));}
     if(heating2 == false){
-    Serial.println("HEATING2 : OFF");}
+    Serial.println(F("HEATING2 : OFF"));}
     else if(heating2 == true){
-    Serial.println("HEATING2 : ON");}
+    Serial.println(F("HEATING2 : ON"));}
 //--------------Affichage LCD--------------------
   lcd.setCursor(0, 0);
-  lcd.print("T: ");
-  lcd.print(greenhouseTemperature);
-  lcd.print("C  ");
-  lcd.setCursor(10,0);
-  lcd.print("HR: ");
-  lcd.print(greenhouseHumidity);
-  lcd.print("%"); 
-  if(fan == false){
-      lcd.setCursor(0, 2);             
-      lcd.print("FAN:");
-      lcd.setCursor(16,2);
-      lcd.print("OFF");}
-  else if(fan == true){
-      lcd.setCursor(0,2);
-      lcd.print("FAN:");
-      lcd.setCursor(16,2);
-      lcd.print("ON ");}
-  if(heating1 == false){
-      lcd.setCursor(0, 3);             
-      lcd.print("HEATING:");
-      lcd.setCursor(16,3);
-      lcd.print("OFF");}
-  else if(heating1 == true){
-      lcd.setCursor(0,3);
-      lcd.print("HEATING: ");
-      lcd.setCursor(16,3);
-      lcd.print("ON ");}
-//--------------fin du cycle--------------------
-  delay(SLEEPTIME);
-}
-
-//--------------SOUS-PROGRAMMES--------------------
+  if((greenhouseTemperature!= last_greenhouseTemperature)||(greenhouseHumidity != last_greenhouseHumidity)){
+  displayTempHRStatus();
+  }
+  if(opened != last_opened){
+  displayRollupStatus();
+  }
+  if((fan != last_fan)||(heating1 != last_heating1)){
+  displayFanHeaterStatus();
+  }
+  
+last_greenhouseTemperature = greenhouseTemperature;
+last_greenhouseHumidity = greenhouseHumidity;
+last_opened = opened;
+last_fan = fan;
+last_heating1 = heating1;
+last_heating2 = heating2;
+}
+
 //Affichage du % d'ouverture des rollup
 void setOpenedStatus(int pctIncrease){
   opened += pctIncrease;

//État de la deuxième fournaise
void setHeater2(int heaterCommand2){
  if ((heaterCommand2 == ON) && (heating2 == false)){
    Serial.println("");  
    Serial.println("  Start heating2");
    heating2 = true;
  }else if ((heaterCommand2 == OFF) && (heating2 == true)){
    Serial.println("");  
    Serial.println("  Stop heating2");
    heating2 = false;    
    }
  }

    animate(1);
    digitalWrite(ROLLUP1_POWER,OFF);
    digitalWrite(ROLLUP2_POWER,OFF);
    Serial.println(F("  Done opening"));
    lcd.setCursor(0, 1);
    lcd.print(F("ROLLUPS:     "));
    delay(PAUSE_TIME);
  }
}
