   // Define the aggressive and conservative Tuning Parameters
   double aggKp = 43.7, aggKi = 0.323, aggKd = 7.18;
   double consKp = 4.47, consKi = 0.033, consKd = 0.734;
-  PID myPID(&Temp, &Mosfet, &Consigne, consKp, consKi, consKd, DIRECT);
+  PID myPID(&TempRain, &Mosfet, &Consigne, consKp, consKi, consKd, DIRECT);
 #endif //USE_RAIN_SENSOR*/
 
 float T22int,Hr22int,DewInt,T22ext,Hr22ext,DewExt,Light,Tp,P,T,IR,Clouds,skyT,Tir,WindSpeed,MaxWindSpeed,Capacity,reedSwitchDeltaTime, stringCheck;

        SUM += 8.1328e-3 * (pow(10,(-3.49149*(AZERO-1)))-1) ;
        SUM += log10(1013.246);
        double VP = pow(10, SUM-3) * humidity;
        double T = log(VP/0.61078);   // temp var
        return (241.88 * T) / (17.558-T);
}

// delta max = 0.6544 wrt dewPoint()

  int samples[NUMSAMPLES];
  // Variables pour PID
  // Measured temperature
  double TempRain;
  // PWM value 0-255 :
  double Mosfet;

