   float average;
 
   // take N samples in a row, with a slight delay
-  for (i = 0; i < NUMSAMPLES; i++) {
-    samples[i] = analogRead(THERMISTORPIN);
-  }
+  //for (i = 0; i < NUMSAMPLES; i++) {
+  //  samples[i] = analogRead(THERMISTORPIN);
+  //}
 
   // average all the samples out
   average = 0;
   for (i = 0; i < NUMSAMPLES; i++) {
-    average += samples[i];
+    //average += samples[i];
+    average += analogRead(THERMISTORPIN);   
   }
   average /= NUMSAMPLES;
 

     }
  }

  //if ((Temp < HOT_TEMPERATURE_SECURITY) | (Temp > COLD_TEMPERATURE_SECURITY)) {
  if (Temp < HOT_TEMPERATURE_SECURITY) {
    regulHeat(Temp, Consigne);
  } else {
    regulHeat(Temp, -50);
  }
  #endif //USE_RAIN_SENSOR*/
  


  return steinhart;
}

void regulHeat(double Temperature, double Target) {

  double gap = abs(Target - Temperature); //distance away from setpoint
