       fridgePid.compute();
       plate.turn(Plate::STATE::OFF);
       
-      if(stateMode==STATEMODE::MESURE){
-        writeRCT0(totalRCT.average(counterRCT));
-      }
+  
       
       if(btnNEXT.getState()==Button::STATE::DOWN){
+          
         stato=STATE::IDLE;
         displayTimer1=0;
         displayTimer2=0;


      if(counterRCT>=NUMOFRCTMESURE){
          if(counterRCTCycle>=NUMMESUREMENT){
            stato=STATE::END;
            displayTimer1=0;
            displayTimer2=0;
            lcd.clear();
          }else{
            totalRCT.newVal(cycleRCT.median(counterRCT));
            counterRCT=0;
            counterRCTCycle++;
          }


double normalize(double val){
  //return asd; TODO usare getIndex per capire quale funzione di taratura usare
  //if(buttonAmb.value == 20 )
      return 3.2257*val  - 0.14064 ;
      
 // else
 //     return val ;    
}
