Connecting blynk-cloud.com : 80 .... can't work

i need you help…
i’m Thai
I’m sorry, I’m not good at English
I have a problem with my code, as in the example

    #define BLYNK_PRINT Serial
    #define BLYNK_DEBUG        // Optional, this enables more detailed prints
    #include <WiFi.h>
    #include <WiFiClient.h>
    #include <BlynkSimpleEsp32.h>
    #include <SimpleTimer.h>
    #include <SimpleDHT.h>

    char auth[] = "Ul3cq98pci8XCXbMoVrwQzVdHYPWN9bA";
    char ssid[] = "Zodiannm";
    char pass[] = "anm6024418050";
    char server[] = "blynk-cloud.com";
    int port = 80;

    int DHTSENSOR = 15;             //GPIO15 (ADC2_CH3)

    SimpleDHT22 dht22(15);
    BlynkTimer timer;

    void setup() {
       Serial.begin(115200);
   //   Blynk.begin(auth, ssid, pass,"blynk-cloud.com", 80); 

     WiFi.begin(ssid, pass); //เชื่อมต่อ WiFi      
     Blynk.config(auth, "blynk-cloud.com", 80); //-----------2
     Blynk.connect(); 
     timer.setInterval(5000L, sendSensor);    
    }

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

    void sendSensor() {
      byte temperature = 0;   
      byte humidity = 0;
      dht22.read(DHTSENSOR, &temperature, &humidity, NULL);
      while (temperature == 0) {
        dht22.read(DHTSENSOR, &temperature, &humidity, NULL);  
        Serial.println("DHT22 get failed");
        delay(1500);
      }
      Blynk.virtualWrite(V13, humidity);   
      Blynk.virtualWrite(V12, temperature);  
      Serial.print("Humidity: ");
      Serial.print(humidity);
      Serial.print("% | ");
      Serial.print("Temperature: ");
      Serial.print(temperature);
      Serial.println("C");
    }

form code

when i use this code

 WiFi.begin(ssid, pass); //เชื่อมต่อ WiFi      
 Blynk.config(auth, "blynk-cloud.com", 80); //-----------2
 Blynk.connect(); 

I will get results
image

Can you tell me why?
thank you for help :frowning:

Try starting with this sketch modified to your needs.

https://examples.blynk.cc/?board=ESP32&shield=ESP32%20WiFi&example=More%2FDHT11

I tried changing the wifi using my friend’s hotspot.
program is running

The conclusion is at the internet, right?

Yes, either you have a problem with your router, or your ISP is blocking the Blynk protocol.

Pete.

Will the temp work right stored as bytes?

Then what methods can be prevented?
thank you

Reboot your router and see if that helps, or find a new ISP.

Pete.

From the example you provided

temperature is normal but humidity is abnormal
form picture When i convert the code

    #define BLYNK_PRINT Serial
    #include <WiFi.h>
    #include <WiFiClient.h>
    #include <BlynkSimpleEsp32.h>
    #include <SimpleTimer.h>


    #include "DHT.h"
    DHT dht;

    char auth[] = "Ul3cq98pci8XCXbMoVrwQzVdHYPWN9bA";
    char ssid[] = "iPhone";
    char pass[] = "bank1996";
    char server[] = "blynk-cloud.com";
    int port = 8080;

    BlynkTimer timer;

    void setup() {
      Serial.begin(115200);
      //เริ่มการเชื่อมต่อ Blynk Server
      Blynk.begin(auth, ssid, pass,"blynk-cloud.com", 8080);

     //WiFi.begin(ssid, pass); //เชื่อมต่อ WiFi
    // Blynk.config(auth,"blynk-cloud.com", 8080); //กำหนด Token key , ชื่อ Server และ port
     //Blynk.connect(); //เชื่อมต่อไปยัง Blynk
      dht.setup(15);
    //ตั้งเวลาส่งข้อมูลให้ Blynk Server ทุกๆ 1 วินาที
       timer.setInterval(5000L, sendSensor);    
    }

    void loop() {
      Blynk.run();
      timer.run();
    }
    byte a = 0;
    void sendSensor() {
      delay(dht.getMinimumSamplingPeriod());
      byte  humidity=0;
      humidity = dht.getHumidity(); // ดึงค่าความชื้น
      byte temperature = dht.getTemperature(); // ดึงค่าอุณหภูมิ
      a = map(humidity,0,255,0,100);
     
      //ส่งค่า humidity V13 ไปยัง blynk server
      Blynk.virtualWrite(V13, a);   
      //ส่งค่า temperature V12 ไปยัง blynk server
      Blynk.virtualWrite(V12, temperature);  
      Serial.print("Humidity: ");
      Serial.print(a);
      Serial.print("% | ");
      Serial.print("Temperature: ");
      Serial.print(temperature);
      Serial.println("C");
    }

If I don’t have this line

a = map(humidity,0,255,0,100);

The humidity is not a byte number but a float.