ESP8266 Stand alone no work

Hello friends,

I have a problem and I don’t know how to solve it, or why what happens to me is happening, so I thank everyone who can help me.

I tried a sketch, with boards bought in stores, ESP8266, like NodeMcu and other well-known brands, it worked well, but for my project, I had several boards assembled, using the ESP8266 f chip and mounting the chip on a board to meet my need, the board works well for example on Arduino Cloud, an IoT platform, and it also loads all the codes well, when choosing the board from the list in the arduino IDE, I choose ESP8266 nodemcu, today I tried to upload my sketch on the platform here from Blynk, and although load the sketch normally, the ESP doesn’t show up online, I tried the same sketch with mounted boards and it works as expected, online, but with the stand alone board that I made using the chip, it doesn’t show up online.
What could be happening? Can anyone help me find out.
I put here the sketch, and a photo of my board.
Thanks in advance to everyone.
Greetings from Brazil.


// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "xxxx!
#define BLYNK_DEVICE_NAME "xxxx"
#define BLYNK_AUTH_TOKEN "xxxx"

#define BLYNK_FIRMWARE_VERSION        "1.0.1"

#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 the GPIO connected with Relays and switches
#define RelayPin1 4  //D1
#define RelayPin2 2  //D2
#define RelayPin3 13 //D5
#define RelayPin4 12 //D6

#define SwitchPin1 10  //SD3
#define SwitchPin2 D3   //D3 
#define SwitchPin3 13  //D7
#define SwitchPin4 3   //RX

#define wifiLed   16   //D0

//Change the virtual pins according the rooms
#define VPIN_BUTTON_1    V1
#define VPIN_BUTTON_2    V2
#define VPIN_BUTTON_3    V3 
#define VPIN_BUTTON_4    V4

// Relay State
bool toggleState_1 = LOW; //Define integer to remember the toggle state for relay 1
bool toggleState_2 = LOW; //Define integer to remember the toggle state for relay 2
bool toggleState_3 = LOW; //Define integer to remember the toggle state for relay 3
bool toggleState_4 = LOW; //Define integer to remember the toggle state for relay 4

// Switch State
bool SwitchState_1 = LOW;
bool SwitchState_2 = LOW;
bool SwitchState_3 = LOW;
bool SwitchState_4 = LOW;

#include "BlynkEdgent.h"

BLYNK_CONNECTED() {
  // Request the latest state from the server
  Blynk.syncVirtual(VPIN_BUTTON_1);
  Blynk.syncVirtual(VPIN_BUTTON_2);
  Blynk.syncVirtual(VPIN_BUTTON_3);
  Blynk.syncVirtual(VPIN_BUTTON_4);
}

// When App button is pushed - switch the state

BLYNK_WRITE(VPIN_BUTTON_1) {
  toggleState_1 = param.asInt();
  if(toggleState_1 == 1){
    digitalWrite(RelayPin1, LOW);
  }
  else { 
    digitalWrite(RelayPin1, HIGH);
  }
}

BLYNK_WRITE(VPIN_BUTTON_2) {
  toggleState_2 = param.asInt();
  if(toggleState_2 == 1){
    digitalWrite(RelayPin2, LOW);
  }
  else { 
    digitalWrite(RelayPin2, HIGH);
  }
}

BLYNK_WRITE(VPIN_BUTTON_3) {
  toggleState_3 = param.asInt();
  if(toggleState_3 == 1){
    digitalWrite(RelayPin3, LOW);
  }
  else { 
    digitalWrite(RelayPin3, HIGH);
  }
}

BLYNK_WRITE(VPIN_BUTTON_4) {
  toggleState_4 = param.asInt();
  if(toggleState_4 == 1){
    digitalWrite(RelayPin4, LOW);
  }
  else { 
    digitalWrite(RelayPin4, HIGH);
  }
}


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

  pinMode(wifiLed, OUTPUT);

  pinMode(SwitchPin1, INPUT_PULLUP);
  pinMode(SwitchPin2, INPUT_PULLUP);
  pinMode(SwitchPin3, INPUT_PULLUP);
  pinMode(SwitchPin4, INPUT_PULLUP);

  //During Starting all Relays should TURN OFF
  digitalWrite(RelayPin1, HIGH);
  digitalWrite(RelayPin2, HIGH);
  digitalWrite(RelayPin3, HIGH);
  digitalWrite(RelayPin4, HIGH);

  digitalWrite(wifiLed, HIGH);

  BlynkEdgent.begin();

  Blynk.virtualWrite(VPIN_BUTTON_1, toggleState_1);
  Blynk.virtualWrite(VPIN_BUTTON_2, toggleState_2);
  Blynk.virtualWrite(VPIN_BUTTON_3, toggleState_3);
  Blynk.virtualWrite(VPIN_BUTTON_4, toggleState_4);

}

void loop() {

    BlynkEdgent.run();
    
    manual_control(); //Manual Switch Control   
}

Thanks Pete, I already corrected it, I take the opportunity to put an image of the serial monitor when I reset the ESP8266 after loading the sketch

@kwiek 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.

You’re causing a conflict with Edgent, as GPIO0 (D3) and GPIO2 (D4) are used in Settings.h

You should read this…

You’d also do yourself a favour if you used the correct translation between GPIO numbers and D numbers.

Also, when you post serial monitor output please copy the text and paste it between triple backticks rather than posting screenshots.
The garbage in your serial monitor would be eliminated if you used 74880 as your serial baud rate.

Pete.

Hi Pete,

Thanks for your help, I’ll try to fix the problem as per your suggestion.
After I changed the speed of the serial monitor this is the message that appears

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v951aeffa
~ld
⸮⸮⸮ ⸮

You need to change both the serial monitor and the Serial.begin command in your sketch.

The native default baud rate for an ESP8266 with no external CPU clock circuitry is 74880, so the boot messages from the board will be sent to the serial monitor at that baud rate, and appear as garbage if you have a different baud rate selected in the serial monitor.
In the same way, if your sketch is outputting debug serial data at 115200 and you have your serial monitor set to 74880 the debug data will appear as garbage.

Matching your Serial.begin baud rate and your serial monitor to the native baud rate of your board will allow both sets of serial data to display correctly.

Pete.