Problema con codigo que se sobrepone

A ver ahora con estas correcciones?

#include <LiquidCrystal.h>
#include <DHT.h>

boolean estadoLed       = true;  
int intervaloEncendido  = 1800000; 
int IntervaloApagado    = 7250; 
unsigned long tiempoAnteriorEncendido; 
unsigned long tiempoAnteriorApagado;  
unsigned long tiempoPresento;

int SENSOR = 8;
int VO = 0;
int RS = 2;
int E = 3;
int D4 = 4;
int D5 = 5;
int D6 = 6;
int D7 = 7;

int temp;
int humedad;

DHT dht (SENSOR, DHT11);
LiquidCrystal lcd (RS, E, D4, D5 ,D6, D7);

void setup(){
  dht.begin();
  
  lcd.begin(16, 2);
   
  pinMode(13,OUTPUT); 
  digitalWrite(13,estadoLed); 
}    

void loop(){

    if ((millis()-tiempoAnteriorEncendido >= intervaloEncendido) && estadoLed){ 
        estadoLed = false; 
        digitalWrite(13, estadoLed); 
        tiempoAnteriorEncendido = millis(); 
    }
    if (millis()-tiempoAnteriorApagado >= IntervaloApagado && !estadoLed){ 
        estadoLed = true; 
        digitalWrite(13, estadoLed); 
        tiempoAnteriorApagado = millis(); 
    }
    
    if (millis()-tiempoPresento > 500UL) {
        humedad = dht.readHumidity();
        temp = dht.readTemperature();

        lcd.clear();
        lcd.setCursor(0,0);
        lcd.print("Temperatura: ");
        lcd.print(temp);
        lcd.print("C");
        lcd.setCursor(0,1);
        lcd.print("Humedad: ");
        lcd.print(humedad);
        lcd.print("%");
        //delay(500);   
    }
}