BlynkTimer timer;
void setup()
{
timer.setInterval(1000L, getdata);
}
void loop() {
Blynk.run();
timer.run();
}
void getdata() {
h = dht.readHumidity();
t = dht.readTemperature();
u = analogRead(A1);
l = analogRead(A0);
l = l / 2;
if (l > 60) {
digitalWrite(led, HIGH);
} else {
digitalWrite(led, LOW);
}
}
You need to follow this way, to keep your loop clean. The functions need to be called by a timer