Problem reading serial port through HC-05

Hello I have these two codes Master and Slave

Master

const int sensorPin = A0;

void setup()
{  
  Serial.begin(9600);    
  pinMode(sensorPin, INPUT);
  
}

void loop()
{
  
  int sensorVal = analogRead(sensorPin); 
 
  float voltage = (sensorVal/1024.0)* 5.0;  
  float temperature = (voltage-0.5)*100;
 
  Serial.println(temperature);
 

  
  delay(2000);

 
}

Slave

char c;
const byte numChars = 32;
char receivedChars[numChars];
boolean newData = false;
const float baseline = 15.0;
float temp;

void setup(){      

   Serial.begin(9600);
   pinMode(7, OUTPUT);
   pinMode(6, OUTPUT);
   pinMode(5, OUTPUT);

   digitalWrite(7, LOW);
   digitalWrite(6, LOW);
   digitalWrite(5, LOW);

}

void loop() 
{
  recvWithEndMarker();
  showNewData();
}


void recvWithEndMarker() {
  static byte ndx = 0;
  char endMarker = '\n';
  char rc;
  
  // if (Serial.available() > 0) {
  while (Serial.available() > 0 && newData == false) {
    rc = Serial.read();
  
    if (rc != endMarker) {
     receivedChars[ndx] = rc;
     ndx++;
       
      if (ndx >= numChars) {
      ndx = numChars - 1;
      }
    }
  
    else {
      receivedChars[ndx] = '\0'; // terminate the string
      ndx = 0;
      newData = true;
      }
  }
}

void showNewData() {
 if (newData == true) {
   
   temp = atof(receivedChars);
   Serial.println(temp);
   newData = false;

  if (temp > baseline && temp < baseline+10){
    digitalWrite(7, HIGH);
    digitalWrite(6, LOW);
    digitalWrite(5, LOW);
    }

  else if(temp >= baseline+11 && temp < baseline+20){
    digitalWrite(7, HIGH);
    digitalWrite(6, HIGH);
    digitalWrite(5, LOW);
    }

  else if(temp >= baseline+21 && temp < baseline +30){
    digitalWrite(7, HIGH);
    digitalWrite(6, HIGH);
    digitalWrite(5, HIGH);
    }

  delay(1000);
  
 }
}

I've tried this before without problem, I re-configured the HC-05 modules and they stablish the communication correctly but I still got nothing on Serial Monitor (i've attached a screenshot)

hugorogz:
I've tried this before without problem

Were you using the exact same code as you posted above?

have you tried it without the Serial Monitor open on the master's com port? I don't know if this causes problems. I've always only had a serial port opened by one device at a time but it may well be fine to do this.

I suggest adding some debugging serial prints to the slave sketch so you can get a better idea of what's happening

Have you a HC05 on both Arduinos (what types of Arduino?) and is the Master connected to the PC using the USB cable?

What Arduino pins are the two HC05s connected to?

...R