How to continuously update data

• Hardware model: Arduino WEMOS D1 R2
• Smartphone OS version: Android 9
• Blynk server
• Blynk Library version : 0.5.0

The Blynk APP can continuously update temperature and humidity when updating data every ten seconds
delay(10000); //Upload data time

The BLYNK APP cannot continuously update the temperature and humidity and only displays the first data when updating the data every minute
delay(60000); //Upload data time

So how do I update the temperature and humidity to the BLYNK APP every minute?

Many Thanks!

//APP Blynk
#include <BlynkSimpleEsp8266.h>
#define BLYNK_PRINT Serial
BlynkTimer timer;

#include "DHT.h"    // dht22 
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>

//*-- Hardware Serial
#define _baudrate   9600

//*-- dht22
#define _dhtpin     2         //according to pin define D4
#define _dhttype    DHT22     //Select sensor type

// Initialize DHT sensor 
DHT dht22( _dhtpin, _dhttype );
float temperature, humidity; 

//*-- IoT Information
#define SSID    "D-Link_DIR-612_Irving"  //your AP ssid
#define PASS    "0939953008"             //your AP password
#define HOST    "api.thingspeak.com" // ThingSpeak IP Address: 184.106.153.149
#define PORT    80
#define READAPIKEY  "x"  // READ APIKEY for the CHANNEL_ID

// GET /update?key=[THINGSPEAK_KEY]&field1=[data 1]&filed2=[data 2]...;
String GET = "GET /update?key=x";

//Blynk Information
char ssid[] = "D-Link_DIR-612_Irving";                     
char pass[] = "0939953008";
char auth[] = "x";   //Blynk Verification code

void setup() {
    Serial.begin( _baudrate );
    Serial.println( "ESP8266 Ready!" );
    Serial.println( "Sample01" ); //sample01
    // Connecting to a WiFi network
    Serial.print("Connect to ");
    Serial.println( SSID );
    WiFi.begin( SSID, PASS );

    //setup blynk
    Blynk.begin(auth, ssid, pass);
    Serial.println( "Blynk Ready!" );
    delay(1000);
    
    while( WiFi.status() != WL_CONNECTED )
    {
        delay(500);
        Serial.print( "." );
    }
    Serial.println( "" );

    Serial.println( "WiFi connected" );
    Serial.println( "IP address: " );
    Serial.println( WiFi.localIP() );
    Serial.println( "" );
    
    // dht22
    dht22.begin();
    Serial.println( "DHT22 Ready!" );
    delay(2000);

    timer.setInterval( 1000L, upblynk );
}



void loop() {
    
    Blynk.run();
    timer.run();
}

void upblynk()
{
  delay(1000);
    humidity    = dht22.readHumidity();
    temperature = dht22.readTemperature();

   
    if( isnan( humidity ) || isnan( temperature ) )
    {
        Serial.println( "sample01 Failed to read form dht22" );
        WiFiClient client;
        if( !client.connect("maker.ifttt.com",80 ) )
    {
      Serial.println( "fail" );
    return;
    }
    else
    {
      
    String getStr_line = "GET /trigger/test/with/key/csF5wehrx8iqKJu1HnsBrL?value1=sample01Failed HTTP/1.1\r\n";
        client.print( getStr_line );
        client.print( "Host: maker.ifttt.com\n" );
        client.print( "Connection: close\r\n\r\n" );
        client.stop();
        delay(10000);
        return;
    }
    }
    else
    {
            
        Serial.print( "sample01Humidity: " );
        Serial.print( humidity );
        Serial.print( "sample01Temperature: " );
        Serial.println( temperature );
        updatedht22();
        delay(60000); //Upload data time
    }
}
void updatedht22()
{
  Blynk.virtualWrite(V0, temperature);
  Blynk.virtualWrite(V1, humidity );

    WiFiClient client;
    
    if( !client.connect( HOST, PORT ) )
    {
        Serial.println( "connection failed" );
        return;
    }
    else
    {
        
        String getStr = GET + "&field1=" + String((int)temperature) + 
                              "&field2=" + String((int)humidity) +
                              " HTTP/1.1\r\n";;
        client.print( getStr );
        client.print( "Host: api.thingspeak.com\n" );
        client.print( "Connection: close\r\n\r\n" );
        Serial.println( "Thingspeak PASS" );
        
        delay(1000); 
        
        client.stop();
        }
}

Don’t use delays in your code, use timers instead.
Delays will cause the code to stop at that point for the duration of the delay, which will result in Blynk disconnecting.

Pete.

After that add a line similar to the but for the dht function and set the milliseconds to 60000L.

Voila!