First time blynk, appears to be unresponsive and slow at times

I have made a very simple on/off button for an LED on an ESP32 espressif 32d dev board.
Attempts at controlling the LED state from the dashboard or the application leads to inconsistent responsiveness, sometimes the button responds, sometimes not and either remains on or off no matter how many times the button is clicked.
Resetting the board doesn’t help.
This is my code:

#define BLYNK_PRINT Serial

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

char auth[] = BLYNK_AUTH_TOKEN;

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

// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin V1
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable

digitalWrite(15, pinValue);

void setup()
// Debug console
pinMode(15, OUTPUT);

//Blynk.begin(auth, ssid, pass);
// You can also specify server:
Blynk.begin(auth, ssid, pass, "", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);

void loop()

I have one datastream as a virtual pin V0
Blynk version is the current latest, downloaded as ZIP from github.
ESP32 library version 1.0.0, I had to downgrade the version otherwise Blynk wouldnt connect.

Please help.

It could be an internet issue. Have you tried a different network ?

You don’t have to specify a server, just add the

#define BLYNK_TEMPLATE_ID           "TMPLxxxxxx"
#define BLYNK_DEVICE_NAME           "Device"
#define BLYNK_AUTH_TOKEN            "YourAuthToken"

at the top of your sketch (the first lines) then use

Blynk.begin(auth, ssid, pass);

and it should work.

My guess is that you’re using the wrong url for the ESP32 core in your IDE’s Preferences settings.
You should be running version 2.0.5 or 2.0.6 (which was released a few days ago) of the ESP32 core.

Read the installation instructions here…

If you still have problems connecting when you’ve done this, and made the changes that @John93 has mentioned, then take a look at your compiler output. You may be using an old version of WiFi.h


how do I check if it’s a network issue? Is there any way I can diagnose this with another application?
I’ve specified server and port in an endeavor to make my LED respond :slightly_frowning_face:

As @John93 said…

No, not really. Your ISP may be blocking the Blynk protocol, although it’s difficult to say without seeing your serial output, and as no other application will use the Blynk protocol the 9nky way to test is with Blynk.

You don’t need to do this if you have the three lines of Firmware Configuration code at the top of your sketch, so take @John93’s advice and remove them.