ESP8266 NodeMcu reconects to blynk-cloud.com:8442

My slightly modified ESP8266_Standalone code worked good.

#define BLYNK_PRINT Serial  
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "c2138d69a6a_token_471625cd6359b6";
int led = 12;
int thermistorPin = A0; //analog pin 0

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, "HOME", xaxa");
  pinMode(led, OUTPUT);
}
void loop()
{
  Blynk.run();
  pinMode(led, OUTPUT);
  int thermistorReading = analogRead(thermistorPin); 
}

And today couldn’t connect from app to controle relay hanging on pin 12.

I thought esp dropping connection with internet, so i flashed with this code just to see if it can ping blynk web site ip. Here is result i got, look like connection is stable. Please help.

It’s probably your code. You shouldn’t read the analog pin in the loop() function.

Instead, use the timer. In the Blynk library there is a GettingStarted Example called “PushData” which uses a timer. This is a way better method :slight_smile:

1 Like

It helped. Removed reading analog pin from the loop().