Connecting to blynk.cloud:80

HI i am very new to this and i am trying to connect my device to blynk cloud. it says it’s connecting and ready. But the led is not blinking and it is not connected to blynk.cloud

#define BLYNK_TEMPLATE_ID           "TMPLYhojeepb"
#define BLYNK_AUTH_TOKEN            "aRfkuTEVyG6ZKyTHM_YCUVZ-tYmVZIp5"
#define BLYNK_DEVICE_NAME           "Sewage Monitoring System"

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp8266.h>

#include <ESP8266WiFi.h>

const int trigPin1 = D3;

const int echoPin1 = D2;

#define redled D4

char auth[]="*********************";
char ssid[] = "HimChaKum";
char pass[] = "********";
int duration1,distance1;

int count=0;

void setup()

{

  pinMode(trigPin1, OUTPUT);

  pinMode(echoPin1, INPUT);

  pinMode(A0, INPUT);

  digitalWrite(A0, OUTPUT);

  pinMode(redled, OUTPUT);

  digitalWrite(redled, LOW);

  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);

}
void loop()

{

  int float1=analogRead(A0);

  digitalWrite(trigPin1, LOW);

  delayMicroseconds(2);

  digitalWrite(trigPin1, HIGH);

  delayMicroseconds(10);

  digitalWrite(trigPin1, LOW);

  duration1 = pulseIn(echoPin1, HIGH);

  distance1 = duration1 * 0.034 / 2;

  Serial.println(float1);

   Blynk.virtualWrite(V1,distance1);

   if(distance1<=5)

   {

    Blynk.notify("Blockage Alert!");

    digitalWrite(redled, HIGH);

   }

   else if(float1<=800)

   {

    Blynk.notify("Overflow Alert !");

     digitalWrite(redled, HIGH);

   }

      else

   {

    digitalWrite(redled, LOW);

   }

    Blynk.run();

   }

Connecting to HimChaKum
[4297] Connected to WiFi
[4297] IP: 192.168.8.102
[4297] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.0 on ESP8266

[4374] Connecting to blynk.cloud:80
[4722] Ready (ping: 74ms).
3
9
2

First of all, update the library to the latest version ( 1.0.1 ).

Second thing, you should keep your void loop clean, read this
https://docs.blynk.io/en/legacy-platform/legacy-articles/keep-your-void-loop-clean

also, blynk.notify has been replaced with blynk.logEvent

The onboard LED connected to GPIO2 (D4) is active LOW, so will only come on if your else condition is met, and I doubt that it is ever being met.

This line of code…

Should be printing your float1 value, but it’s impossible to tell which of the numbers in your serial output relate to which variable.

Also, this makes no sense…

Pete.

Library is in latest version and what do you mean by blynk.notify is replaced with blynk.logEvent?

Ok,but to know the float value i must first connect it the blynk cloud right? What i meant when i said the node is not blinking is, it’s not flashing to connect to the blynk app in my mobile

Read this

That only happens when you use Edgent for dynamic provisioning. You’ve used static provisioning, and your device has already connected to Blynk.

I don’t understand the question. I’d suggest you study your sketch and attempt to understand how it actually works.

Does this mean that you’ve now updated from 1.0.0 to 1.0.1 ?

Pete.