 void htu21()
{
  float temphtu = htu.readTemperature()*10;
    float rel_hum = htu.readHumidity()*10;
   if( temphtu>=0)
   {zntemp=1;
   }
   else
   {zntemp=0;
   }
   
  
  temp=abs(temphtu);

   if(zntemp==1)//+
   {
    if(znmax == 1)//+
    {if(temp>tempmax)
    {tempmax=temp;
     znmax=zntemp;
    tax =tHour*1000+tMin;}
    }
    else//-
    {tempmax=temp;
    znmax=zntemp;
    tax =tHour*1000+tMin;
    }

    if(znmin == 1)//+
    {if(temp<tempmin){
    tempmin=temp;
    znmin=zntemp;
    tin =tHour*1000+tMin;}
     }
    else//-
    {tempmin=tempmin;
    
    }

    
   }

   
     if(zntemp==0)//-
   {
    if(znmax == 1)//+
    {tempmax=tempmax;
      
    }
    else//-
    {if(temp<tempmax){tempmax=temp;
    znmax=zntemp;
    tax =tHour*1000+tMin;}
    }

    if(znmin == 1)//+
    {tempmin=temp;
     znmin=zntemp;
     tin =tHour*1000+tMin;
     }
    else//-
    {
    if(temp>tempmin){tempmin=temp;
    znmin=zntemp;
    tin =tHour*1000+tMin;}
    }
    
    }
     hum=rel_hum;
}
