Your device couldn't connect to the network

  1. Configuring wifi √
  2. Reconnecting back to cloud √
  3. Waiting for device online ×

It says couldn’t connect what should i do?? Please help I really need this for our thesis.

We need to see your code and what you see in the serial monitor else we can’t help :stuck_out_tongue_winking_eye:

// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLRApmarfS"
#define BLYNK_DEVICE_NAME "Quickstart Template"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG
#define USE_NODE_MCU_BOARD

#include "BlynkEdgent.h"
int RelayPin1 = 5;
int RelayPin2 = 4;
int RelayPin3 = 14;

BLYNK_WRITE(V0) { //Button Widget is writing to pin V0
  int pinValue = param.asInt();
  digitalWrite(RelayPin1, pinValue);
}

BLYNK_WRITE(V1) { //Button Widget is writing to pin V1
  int pinValue = param.asInt();
  digitalWrite(RelayPin2, pinValue);
}
BLYNK_WRITE(V2) { //Button Widget is writing to pin V2
  int pinValue = param.asInt();
  digitalWrite(RelayPin3, pinValue);
}


void setup()
{
  Serial.begin(115200);
  pinMode(RelayPin1, OUTPUT);
  pinMode(RelayPin2, OUTPUT);
  pinMode(RelayPin3, OUTPUT);


  //TURN OFF all Relays on Start 
  digitalWrite(RelayPin1, HIGH);
  digitalWrite(RelayPin2, HIGH);
  digitalWrite(RelayPin3, HIGH);

  delay(100);
  BlynkEdgent.begin();
}

void loop() {
  BlynkEdgent.run();
}

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

We also need to see your serial monitor output during the provisioning process. Please post that with triple backticks too.

Pete.

SDK:2.2.2-dev(38a443e)/Core:3.0.2=30002000/lwIP:STABLE-2_1_2_RELEASE/glue:1.2-48-g7421258/BearSSL:6105635

>[391] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.1 on ESP8266

[393] --------------------------
[396] Product:  Quickstart Template
[399] Firmware: 0.1.0 (build Jan 15 2022 16:16:50)
[403] Device:   ESP8266 @ 80MHz
[406] MAC:      58:BF:25:DC:71:4E
[409] Flash:    4096K
[411] ESP core: 3.0.2
[413] ESP SDK:  2.2.2-dev(38a443e)
[416] Boot Ver: 6
[418] Boot Mode:1
[420] FW info:  469376/1626112, MD5:5b3f710bcc175feeb8308da1f0c0eb9a
[628] Free mem: 30728
[628] --------------------------
[628] INIT => WAIT_CONFIG
fpm close 3 
mode : sta(58:bf:25:dc:71:4e) + softAP(5a:bf:25:dc:71:4e)
add if0
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
bcn 0
del if1
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
[1245] AP SSID: Blynk Quickstart Template-EC479
[1245] AP IP:   192.168.4.1
[1246] AP URL:  blynk.setup

done sir

It looks like you have a debug level set in your IDE options, and the other output in the serial monitor (the data from Blynk) isn’t what I’d expect to see when your app displays the information that you posted in your fist post.

Can you turn-off the debugging in the IDE then repeat the process and explain in detail (with screenshots if necessary) what you are seeing in your app during the provisioning process and what you are seeing in the serial monitor at the same time.

Pete.

1 Like

I turned off the debugging in the IDE and it works
! Thankyousomuch sir.

Hey sir

I have the same problem how do I turn of debugging in the ide

[Unformatted serial output removed by moderator]

[Unformatted code removed by moderator]

@Saeed your problem is totally different to the one described in this topic, and appears to be caused by bad coding.

Your serial output and code have been removed because you didn’t format them correctly by adding triple backticks at the beginning and end of the serial output and code.

If you’ve taken the time to read through this topic then you would have read about triple backticks in post #4

Your problem appears to be caused by attempting to use the hardware serial connection method on an ESP8266. You have included the SoftwareSerial library, but failed to use it in any way.

In addition, you have a cluttered void loop which breaks the basic rules of Blynk by attempting to write data to the Blynk server more than 10 times per second.

I’d digest that you do more reading about the PZEM library you are using, and about keeping your void loop clean in Blynk.

if you are still having problems then create a new “need help with my project” topic and provide all of the information requested when you create the topic, as well as following the instructions about how to correctly format your code when posting it to the forum. Use the same method (triple backticks at the beginning and end) for your serial output.

Pete.