     digitalWrite(CHAUFFAGE2, OFF);
   }
   //Programme ventilation forcée
-  if ((greenhouseTemperature > TEMP_VENTILATION)&&(incrementCounter >= 25)) {
+  if ((greenhouseTemperature > TEMP_VENTILATION)&&(incrementCounter == 100)) {
     setFan(ON);
     digitalWrite(FAN, ON);
   } else if (greenhouseTemperature < (TEMP_VENTILATION - HYST_VENT)) {

  
void setSunRise(uint8_t * when){
      HSR = when[2];
      MSR = when[1];}
void setSunSet(uint8_t * when){
      HSS = when[2];
      MSS = when[1];}
      
void Controle() {
  //-----------------Horloge----------------
  checkSunriseSunset();
  t = rtc.getTime();
  int heures = t.hour;
  int minutes = t.min;

  if (((heures == HSR)  && (minutes >= MSR))||((heures > HSR) && (heures < HP2))||((heures == HP2)  && (minutes < MP2))){
    TEMP_CIBLE = TEMP_CIBLEP1;
    PROGRAMME = 1;
  }
  else if (((heures == HSR)  && (minutes >= MSR))||((heures > HSR) && (heures < HP2))||((heures == HP2)  && (minutes < MP2))){
    TEMP_CIBLE = TEMP_CIBLEP2;
    PROGRAMME = 2;
  }
  else if (((heures == HSS)  && (minutes >= HSS))||(heures > HSS)||(heures < HSR)||((heures == HSR)  && (minutes < MSR))){
    TEMP_CIBLE = TEMP_CIBLEP3;
    PROGRAMME = 3;
  }
  //--------------DS18B20--------------------
  sensors.requestTemperatures();
  greenhouseTemperature = sensors.getTempCByIndex(0);
  //--------------Relais--------------------
  //Programme d'ouverture/fermeture des rollups
  if (greenhouseTemperature < (TEMP_ROLLUP - HYST_ROLLUP)) {

        EEPROM.write(9, TEMP_CIBLEP2);
      }
      else {
        switchmenu(52);
      }
      break;
    //-------------------------------SelectMenu53-----------------------------------------
