I can't connect Blynk, please help me. esp32

I would like to ask for some advice on how I should solve this problem. I will connect esp32 to Blynk. In the past, I could connect it and control the relay with Blynk. But today, I can't connect it. The problem I encountered is that I can upload code to the board normally. For example, the code uses DHT11 to display the LCD i2c. It can do it. But when I try to connect Blynk, it can upload code to the board as well. But inside Blynk, it doesn't show that it is online. And I went to check the serial monitor. It shows like this.

This is the code I tried. Sorry if the code is messed up. I'm quite a newbie.

/*************************************************************

  You’ll need:
   - Blynk IoT app (download from App Store or Google Play)
   - ESP32 board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData
  example.
 *************************************************************/
/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL6fHnrj-lv"
#define BLYNK_TEMPLATE_NAME "Project"
#define BLYNK_AUTH_TOKEN "otzPAS5QshQERCAdtTGFSsyr4Tcih0MS"

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

#define pump 4

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "iPhoneXr";
char pass[] = "00000000";

void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
  // You can also specify server:
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);
  pinMode(pump, OUTPUT);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

BLYNK_WRITE(V1)
{
  if (param[0])
    digitalWrite(pump, LOW);
  else
    digitalWrite(pump, HIGH);
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.