Automatic cooling system system using esp8266

I have problem with connecting my esp to Blynk application for that I posting the current code and circuit diagram


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "DHT.h"
#define DHTPIN D5     // Digital pin connected to the DHT sensor
// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321
//#define DHTTYPE DHT21   // DHT 21 (AM2301)
#define FAN_PIN D2   // FAN RELAY
#define BLYNK_TEMPLATE_ID "TMPL3mszwdCYb"
#define BLYNK_TEMPLATE_NAME "Raghu Ram Kumar"
WidgetLED FAN(V0);
char auth[] = "0yKbMRRDRdFqUJdmtrOMkAUhEDEYggX4";
char ssid[] = "Vivov23";
char pass[] = "raghuramkumar";
float humDHT = 0;
float tempDHT = 0;
int Val=0;
// Initialize DHT sensor.
DHT dht(DHTPIN, DHTTYPE);
void setup() {
  Serial.begin(9600);
  pinMode(FAN_PIN, OUTPUT);
  digitalWrite(FAN_PIN, LOW);
  Serial.println(F("DHTxx test!"));
  dht.begin();
  Blynk.begin( auth, ssid , pass );
}
BLYNK_WRITE(V3)
{
  Val = param.asInt(); // assigning incoming value from pin V3 to a variable
  Serial.print(" The Threshhold value is: ");
  Serial.println(Val);
  Serial.println();
}
void loop() {
  
  Blynk.run();
  
  delay(2000);

  humDHT = dht.readHumidity();
 
  tempDHT = dht.readTemperature();

  if (isnan(humDHT) || isnan(tempDHT))
  {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  Serial.print(F("Temperature: "));
  Serial.print(tempDHT);
  Serial.print(F("°C "));
  Serial.println();
  Serial.print(F("Humidity: "));
  Serial.print(humDHT);
  Serial.print(F("%"));
  Serial.println();
  
  Serial.println("***********************");
  Serial.println();
  // Compare Threshold value from Blynk and DHT Temperature value.
  if (Val > tempDHT)
  {
    digitalWrite(FAN_PIN, HIGH);
    FAN.off();
}
  else {
    digitalWrite(FAN_PIN, LOW);
    FAN.on();
    
  } 
  Blynk.virtualWrite(V1, tempDHT);
  Blynk.virtualWrite(V2, humDHT);
}


@Raghu8143 Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

What does your serial monitor show (please copy the text and paste it with triple backticks).
Please don’t post a screenshot.

Pete,

Keep your void loop clean. Use a timer.
https://docs.blynk.io/en/legacy-platform/legacy-articles/keep-your-void-loop-clean

The serial monitor showing like unavailable to read DHT11 sensor

So your initial complaint was…

and now it’s…

I’m not sure how much help you expect based n that information.

Pete.

The intal stage problem was short out but it showing like unavailable to read DHT11 sensor

I’d suggest that you try the DHT example in the Sketch Builder (link at the top of this page) and get your sensor working.
When it is, take a look at the structure of that code, and how it uses BlynkTimer, then adapt your code accordingly.

Pete.