thank you so much, it works!!
update: after about an hour a new type of error showed up.
this is the new code:
#include <Servo.h>
#include <LiquidCrystal.h>
#include <DHT.h>
int rele=2;
int t,u,temperatura=35,intervallo=10,c0=0,c=0,c1=0,c2=0;
int m=0,h=0,g=1;
extern unsigned long timer0_millis;
DHT dht(4,DHT11);
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
Servo servomotore;
void resetMillis() {
cli();
timer0_millis = 0;
sei();
}
void setup() {
dht.begin();
lcd.begin(16, 2);
servomotore.attach(6);
pinMode(rele, OUTPUT);
Serial.begin(9600);
lcd.setCursor(0, 0);
lcd.print("T= ");
lcd.setCursor(5, 0);
lcd.print("C");
lcd.setCursor(0, 1);
lcd.print("U= ");
lcd.setCursor(5, 1);
lcd.print("%");
lcd.setCursor(7, 0);
lcd.print("tempo:");
lcd.setCursor(9, 1);
lcd.print("g");
lcd.setCursor(12, 1);
lcd.print("h");
lcd.setCursor(15, 1);
lcd.print("m");
}
void loop() {
delay(1000);
t=dht.readTemperature();
u=dht.readHumidity();
lcd.setCursor(3,0);
lcd.print(t);
lcd.setCursor(3,1);
lcd.print(u);
lcd.setCursor(7,1);
lcd.print(g);
int tempo=(millis()/1000);
if (m==0) {lcd.setCursor(13, 1);
lcd.print("0");}
if (h==0) {lcd.setCursor(10, 1);
lcd.print("0");}
if (tempo>58) {resetMillis();
m++;}
if (m>0) {lcd.setCursor(13, 1);
lcd.print(m);}
if (m>59) {m=0;
lcd.setCursor(13, 1);
lcd.print(" ");
h++;}
if (h>0) {lcd.setCursor(10, 1);
lcd.print(h);}
if (h>23) {h=0;
lcd.setCursor(10, 1);
lcd.print(" ");
g++;}
/*
if(t>temperatura){
digitalWrite(rele, HIGH);
}
else{
digitalWrite(rele, LOW);
}
if(u<40){if(c0==0){servomotore.write(80);
delay(2000);
servomotore.write(111);}
c0++;
if(c0==15){c0=0;}
}
if((u>=40)&&(u<50)){c0=0;
if(c==0){servomotore.write(80);
delay(1000);
servomotore.write(111);}
c++;
if(c==1200){c=0;}
}
if((u>=50)&&(u<55)){c=0;
if(c1==0){servomotore.write(80);
delay(500);
servomotore.write(111);}
c1++;
if(c1==600){c1=0;}
}
if((u>=55)&&(u<60)){c1=0;
if(c2==0){servomotore.write(80);
delay(200);
servomotore.write(111);}
c2++;
if(c2==300){c2=0;}
}
if(u>=60) {servomotore.write(111);
c2=0;}
*/
}