Hi there, need a help with my esp32 dht11 connection...The error showing as below

More information required.


1 Like

i’m using esp32 with dht11 sensor and having error with wifi connection.

Connections used?


[Unformatted code removed by moderator]


Please edit your post to add triple backticks before and after your code so that it displays correctly.
Triple backticks look like this:


#define BLYNK_PRINT Serial

int pin = 21;

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

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “aEbPaAkgsFwWICcd0dQ-ZSOEpAC8BLG6”;

// Your WiFi credentials.
// Set password to “” for open networks.
char ssid[] = “eduroam-2G”;
char pass[] = “*********”;

void setup() {
pinMode(pin, OUTPUT);
pinMode(pin, HIGH);

Serial.print("Connecting to ");

WiFi.begin(ssid, pass);
int wifi_ctr = 0;
while (WiFi.status() != WL_CONNECTED) {

Serial.println(“WiFi connected”);

Blynk.begin(“Your auth token key”, ssid, pass);


void loop(){

There’s an EDIT button at the bottom of the post, and I was hoping that you would have do as I requested and actually dated it.
I’ve deleted the code from your previous post.


Done editing it

You’ve included your actual Auth token earlier, and stored it as a variable named auth
Is this what you’re using in this connection string, or something else?


1 Like

I don’t see any code related to DHT11
what pins are you using to connect DHT11 data ??

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

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

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "8ydYe91_SqXfyPmWjiGALbQTCIXT1CKy";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "eduroam-2G";
char pass[] = "******";

#define DHTPIN 0          // D15
// Uncomment whatever type you're using!
#define DHTTYPE DHT11     // DHT 11
//#define DHTTYPE DHT22   // DHT 22, AM2302, AM2321
//#define DHTTYPE DHT21   // DHT 21, AM2301
BlynkTimer timer;
// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void sendSensor()
  float h = dht.readHumidity();
  float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit
  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V5, t);
  Blynk.virtualWrite(V6, h);

void setup()
  // Debug console

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(172,18,91,37), 8080);

void loop()
  // 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!

So what’s happening here?
You’ve posted two totally different pieces of code, with no explanation as to which one related to your serial monitor output.

Some words would help with people’s understanding of what it is that you’re doing.


1 Like

don’t use GPIO 0 from ESP32
use from GPIO13 to 33

sorry the earliest one is for the LED…

The latest one is for the dht 11 and still the same error is happening.
The connection is taking more than 5 mins…


So which pin I should include ?
example of the code ?

The main issue here is the internet connection

I am using GPIO 13

  //*********************** Initialize DHTP11 SENSOR ****************************//
  dht.setup(dhtPin, DHTesp::DHT11); // Connect DHT sensor to GPIO 13

Your issue is not internet connection, but ESP32 reset due to GPIO 0