Bluetooth (HC-05) car controlled via joystick

Hello everyone, I hope you are doing well. I have a problem that I've been trying to solved all this week, but I could not find a solution.

As you could read on the title I'm trying to do a Bluetooth car controlled via joystick. I'm using two Arduino UNO boards, two Arduino Bluetooth module HC - 05 one configured as Master and the other one configure as Slave and also an Arduino Joystick module.

My problem here is when I try to send the data from the Arduino that has de joystick (Master) to the slave board. I just simply can not send this data, the mesure I got at the beginning where a bunch of random numbers on both axis (X and Y), now I just got 0 on both axis (X and Y) and I've been investigating, reading every code's project that is the same as mine and I still getting random measure measure joystick while I move the joystick. I will paste all codes I've been using, so you can help me to find where is the problem.

I have not connected the output from the slave to any L293d, I just been printing what the slave bluetooth is receiving on the serial monitor to know if the data is transmitting well, but it isn't.

I'm also going to upload some serial monitor screenshots.

//Master code 

#include <SoftwareSerial.h>
SoftwareSerial BTM(2,3);

int X;
int Y;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(38400);

}

void loop() {
  // put your main code here, to run repeatedly:

  //Reading Joystick
  X = analogRead(A0)/4; //Transforming the data from 0 to 1023, to 0 to 255.
  Y = analogRead(A1)/4; //Transforming the data from 0 to 1023, to 0 to 255.

  //Sending the data from the joystick.
  BTM.write(X);
  BTM.write(Y);
  delay(20);

// This part is just to corroborate that the joystick is working.
  Serial.print("Eje X:");
  Serial.println(X);
  delay(800);
  Serial.print("Eje Y:");
  Serial.println(Y);
  //delay(800);
}
//Slave code

#include <SoftwareSerial.h>
SoftwareSerial BTS(2,3);

unsigned int X;
//or int X;
unsigned int Y;
//or int Y;

void setup() {
  // put your setup code here, to run once:

  Serial.begin(38400);

}

void loop() {
  // put your main code here, to run repeatedly:
 
  while(BTS.available() >= 2){

    X = BTS.read()*4; //Convert the data received from 0 to 255, to 0 to 1023.
    delay(20); 
    Y = BTS.read()*4; ////Convert the data received from 0 to 255, to 0 to 1023.
  }
   Serial.print("X axis:");
   Serial.println(X);
   delay(800);
   Serial.print("Y axis:");
   Serial.println(Y);
   //delay(800); 
}

With these two code the serial monitor prints this:

These where the others code I've used, on these ones I did not us #include <SoftwareSerial.h>

//Master code

int X;
int Y;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(38400);

}

void loop() {
  // put your main code here, to run repeatedly:
  X = analogRead(A0);
  Y = analogRead(A1);

  Serial.write(map(X, 0, 1023, 0 ,255));
  // or Serial.write(X/40);
  Serial.write(map(Y, 0,1023, 0 ,255));
  // or Serial.write(Y/40);
  delay(20);
}

Here is example code to read a joystick (2 axes) and send the values via Bluetooth HC05. Then receive and parse the data with another HC05. I use methods from the serial input basics tutorial. You will have to change pin numbers and baud rates to match your setup. I see that you set up a software serial port but do not use it. Why? Trying to use the hardware serial for both the HC05 and serial monitor often does not work.
The default communication baud rate (as opposed to the AT mode baud rate) is usually 9600 so that is what I use for SoftwareSerial. I use 115200 for hardware serial (serial monitor).

Sender (master)

#include <SoftwareSerial.h>

const byte xPin = A0;
const byte yPin = A1;

SoftwareSerial ss(4, 7);

void setup()
{
   Serial.begin(115200);
   ss.begin(9600);
}

void loop()
{
   static unsigned long timer = 0;
   unsigned long interval = 1000;
   if (millis() - timer >= interval)
   {
      timer = millis();
      int xValue = analogRead(xPin);
      int yValue = analogRead(yPin);
      Serial.print("x value = ");
      Serial.print(xValue);
      Serial.print("   y value = ");
      Serial.println(yValue);
      char buffer[15];
      snprintf(buffer, 14, "%d,%d", xValue, yValue);
      Serial.println(buffer);
      ss.println(buffer);
   }
}

Receiver (slave)

#include <SoftwareSerial.h>

int xValue = 0;
int yValue = 0;

const byte numChars = 32;
char receivedChars[numChars];   // an array to store the received data

boolean newData = false;

SoftwareSerial ss(4, 7);

void setup()
{
   Serial.begin(115200);
   ss.begin(9600);
}

void loop()
{
 recvWithEndMarker();
   //showNewData();
   if (newData)
   {
      parseData();
      displayData();
      newData = false;
   }
}

void recvWithEndMarker()
{
   static byte ndx = 0;
   char endMarker = '\n';
   char rc;

   while (ss.available() > 0 && newData == false)
   {
      rc = ss.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)
   {
      Serial.print("This just in ... ");
      Serial.println(receivedChars);
      //newData = false;
   }
}

void parseData()
{
   char *strings[2]; // an array of pointers to the pieces of the above array after strtok()
   char *ptr = NULL; byte index = 0;
   ptr = strtok(receivedChars, ",");  // delimiter comma
   while (ptr != NULL)
   {
      strings[index] = ptr;
      index++;
      ptr = strtok(NULL, ",");
   }
  
   // convert string data to numbers
   xValue = atoi(strings[0]);
   yValue = atoi(strings[1]);   
}

void displayData()
{
   Serial.print("x value = ");
   Serial.print(xValue);
   Serial.print("   y value = ");
   Serial.print(yValue);
   
   Serial.println(); // blank line  
}