Help with code kwiek

Hi, can someone tell me why I can’t add this ESP? The code compiles normal, but at the time of ADD via mobile I get the message cannot connect the module to the wi fi network, should I put my network credentials somewhere?

Thanks in advance to everyone who can help.

// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLtwxr8sFQ"
#define BLYNK_DEVICE_NAME "TESTE"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_SPARKFUN_BLYNK_BOARD
//#define USE_NODE_MCU_BOARD
//#define USE_WITTY_CLOUD_BOARD
//#define USE_WEMOS_D1_MINI

#include "BlynkEdgent.h"
const byte Rele_1 = 0;
const byte Rele_2 = 2;

void setup()
{
  Serial.begin(115200);
  delay(100);

  BlynkEdgent.begin();
  
  pinMode (Rele_1, OUTPUT);
  pinMode (Rele_2, OUTPUT);

}

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

BLYNK_WRITE (V0){
  int state = param.asInt();
  digitalWrite(Rele_1,state);
}

BLYNK_WRITE (V1){
  int state = param.asInt();
  digitalWrite(Rele_2,state);
}


You can erase the flash and try again

You haven’t selected a board type, so the custom board type in Settings.h will be used.

I assume that from these pin numbers, you’re using an ESP-01?
As you’ll see from the pin definitions in Settings.h GPIO0 is being used already for BOARD_BUTTON_PIN

I’d suggest that if you are using an ESP-01 then you don’t use the Edgent sketch.

Yo be honest, you’re better-off using a NodeMCU or ESP32.

Pete.

1 Like

Thanks friend!

1 Like

Hi PeteKnight,

Yes I used an esp01 for it, you are rigth, I go use another board as you sugested, thank you. I beleve problem solve so, I feedback later if work fine with other board with the same skecth.
Thank you again.