Serial Monitor Not Showing anything while using SoftwareSerial NodeMCU 12e 8266

Hi first let me show you the diagram and the code

#include <U8g2lib.h>
#include <DFRobotDFPlayerMini.h>
#include <SoftwareSerial.h>

SoftwareSerial mp3Serial(3, 1); // RX, TX
DFRobotDFPlayerMini myDFPlayer;

U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0);

#define u8g_logo_width 128
#define u8g_logo_height 64
static unsigned char u8g_logo_bits[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFB, 0xFF, 0x3F, 0xE0, 0x07,
  0x0E, 0xC0, 0x0F, 0x0E, 0x87, 0x03, 0x7E, 0x00, 0x00, 0x00, 0xFE, 0xFB,
  0xFF, 0x3F, 0xF0, 0x0F, 0x0E, 0xE0, 0x1F, 0x0E, 0x87, 0x03, 0xFF, 0x00,
  0x00, 0x80, 0xFF, 0xFB, 0xFF, 0x3F,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C1, 0x0F, 0xF0, 0x80, 0x03, 0x7E, 0x00,
  0xC0, 0x7F, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0xF8,
  0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xC0, 0x3F, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xC0, 0x3F, 0x00, 0xF8, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0xF8, 0xFF, 0x3F, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0xF8,
  0xFF, 0x3F, 0xF8, 0x0F, 0xFE, 0x03, 0x7C, 0x70, 0x70, 0x00, 0x00, 0x00,
  0xC0, 0x7F, 0x00, 0xF8, 0xFF, 0x3F, 0xF8, 0x1F, 0xFE, 0x07, 0x7C, 0xF0,
  0x78, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0xF8, 0xFF, 0x3F, 0xF8, 0x3F,
  0xFE, 0x0F, 0xFE, 0xE0, 0x38, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0xF8,
  0xFF, 0x3F, 0x38, 0x38, 0x0E, 0x0E, 0xFE, 0xE0, 0x3D, 0x00, 0x00, 0x00,
  0x80, 0xFF, 0x00, 0xF8, 0xFF, 0x3F, 0x38, 0x38, 0x0E, 0x0E, 0xFE, 0xC0,
  0x1D, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x00, 0xF8, 0xFF, 0x3F, 0xF8, 0x3F,
  0x0E, 0x0E, 0xC6, 0xC0, 0x1D, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0xF8,
  0xFF, 0x1F, 0xF8, 0x1F, 0xFE, 0x0F, 0xC7, 0x81, 0x0F, 0x00, 0x00, 0x00,
  0x00, 0xFF, 0x03, 0xF8, 0xFF, 0x1F, 0xF8, 0x3F, 0xFE, 0x07, 0xC7, 0x81,
  0x0F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0xF8, 0xFF, 0x0F, 0xF8, 0x3F,
  0xFE, 0x03, 0xFF, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0xF8,
  0xFF, 0x0F, 0x38, 0x38, 0x8E, 0x07, 0xFF, 0x01, 0x07, 0x00, 0x00, 0x00,
  0x00, 0xFE, 0xFF, 0xFB, 0xFF, 0x07, 0x38, 0x38, 0x0E, 0x87, 0xFF, 0x03,
  0x07, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFB, 0xFF, 0x03, 0xF8, 0x3F,
  0x0E, 0x87, 0x83, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFB,
  0xFF, 0x01, 0xF8, 0x1F, 0x0E, 0x8F, 0x83, 0x03, 0x07, 0x00, 0x00, 0x00,
  0x00, 0xF0, 0xFF, 0xFB, 0xFF, 0x00, 0xF8, 0x0F, 0x0E, 0x8F, 0x83, 0x03,
  0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFB, 0x7F, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFB,
  0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xFF, 0xFB, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFB, 0x01, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x45, 0x1C, 0x89,
  0xBC, 0xE7, 0x91, 0xC8, 0x81, 0x43, 0x0C, 0xC3, 0x89, 0x9E, 0x27, 0x02,
  0x20, 0x4C, 0x22, 0x99, 0x84, 0x20, 0x92, 0x29, 0x82, 0x44, 0x92, 0x24,
  0x8A, 0x82, 0x48, 0x01, 0xE0, 0x54, 0x02, 0xA9, 0x9C, 0x23, 0x92, 0x2A,
  0x80, 0x48, 0x86, 0x20, 0x52, 0x8E, 0x88, 0x00, 0x20, 0x54, 0x32, 0xA9,
  0x84, 0xE0, 0x91, 0x2A, 0x83, 0x48, 0x98, 0x20, 0x52, 0x82, 0x87, 0x00,
  0x20, 0x64, 0x22, 0xC9, 0x84, 0x20, 0x91, 0x2C, 0x82, 0x44, 0x92, 0x24,
  0x52, 0x82, 0x84, 0x00, 0xE0, 0x45, 0x3C, 0x89, 0xBC, 0x27, 0x92, 0xC8,
  0x83, 0x43, 0x0C, 0xC3, 0x21, 0x9E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00,
};
int Green1 = D3;
int Red1 = D4;
int Blue1 = D5;

int Green2 = D6;
int Red2 = D7;
int Blue2 = D8;



void setup(void) {

  pinMode ( Green1, OUTPUT);
  pinMode ( Red1, OUTPUT);
  pinMode ( Blue1, OUTPUT);

  pinMode ( Green2, OUTPUT);
  pinMode ( Red2, OUTPUT);
  pinMode ( Blue2, OUTPUT);


  u8g2.begin();
  u8g2.setFlipMode(1);
  Serial.begin (115200);
  mp3Serial.begin (9600);
  myDFPlayer.begin (mp3Serial);
  delay(1000);
  myDFPlayer.volume(10);
  myDFPlayer.EQ(DFPLAYER_EQ_BASS);
  u8g2.firstPage();
  do {
    u8g2.drawXBM( 0, 0, u8g_logo_width, u8g_logo_height, u8g_logo_bits);

  } while ( u8g2.nextPage() );

  /// delay(3000);
  myDFPlayer.play(1);




}

void loop(void) {
  Serial.println(100);
delay(1000);

}

Note: please read everything before jumping to conclusions XD and there will be some important notes at the end :

As you can see the code is not finished yet but that's not the issue the issue is I can't see anything on the Serial Monitor.

I started troubleshooting and made sure that the settings for SM and the IDE are correct.
I ended up figuring out that if I used SoftwareSerial the problem happens.

for example, this simple test code works fine on the same NodMCU

void setup() {
  // put your setup code here, to run once:
  Serial.begin (115200);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(100);
delay(1000);
}

But if I used the SoftwareSerial in this simple code nothing shows up on the serial monitor !

#include <U8g2lib.h>
#include <DFRobotDFPlayerMini.h>
#include <SoftwareSerial.h>

SoftwareSerial mp3Serial(3, 1); // RX, TX
DFRobotDFPlayerMini myDFPlayer;

void setup() {
  // put your setup code here, to run once:
  Serial.begin (115200);
  mp3Serial.begin (9600);
  myDFPlayer.begin (mp3Serial);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(100);
delay(1000);
}

Can you help?

Notes :

1- RX/TX of the Dfplayer Mini aren't connected while testing this and I know that I can't use them at the same time with the USB is connected to the PC.

2- I have thought that might be me using RX/TX pins on the board for the software serial but unfortunately I can't use the other RX/TX pins because some of them are occupied by the LEDs what do you think?

3- I started this project with a replica ( not official ) NodeMCU 8266 ( there is no info printed on the back BTW )
The funny thing is that the SM works fine also the RX/TX pins are working while the USB being connected ! one of a kind maybe? anyway, I shorted that bad boy by mistake and went and got the Amica NodeMCU and now I'm facing this issue.

4- if this doesn't work I might go and try to buy the same unofficial replica NodeMCU to save me time.

5- I might use the A0 for a sound detector.

6- The full code works fine with all parts except the Serial Monitor issue.

7-LED's will be PWM controlled and analogWrite is working in this diagram.
Thanks for the help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.