sending analog data by using bluetooth [2 arduino MICROs(master and slave)]

Hi, I’m trying to send analog data (using Joystick) from slave MICRO(HC-06) to master MICRO(HC-05)!

There is one condition and it is that I have to use tx,rx pin.

When I used UNO, it worked… But now it doesn’t work anymore.

Codes that used for UNO are below

①master side

void setup() {
  Serial.begin(38400);
}

void loop() {}
void serialEvent(){
 
  int x = Serial.parseInt();
  int y = Serial.parseInt();
  int s = Serial.parseInt();
 
   Serial.print(" X = ");
  Serial.println(x,DEC);
  delay(1);
  Serial.print(" Y = ");
  Serial.println(y,DEC);
  delay(1);
  Serial.print(" S = ");
  Serial.println(s,DEC);
  delay(1);
  Serial.println(" ");

 
  }

②slave side

#include <Joystick.h>

int X = A0;
int Y = A1;
int S = 7;

void setup() {
  Serial.begin(38400);
  pinMode(X, INPUT);
  pinMode(Y, INPUT);
  pinMode(S, INPUT);
  digitalWrite(S, HIGH);
}

void loop() {
  int x,y,s;
  x = analogRead(X);
  delay(1);
  y = analogRead(Y);
  delay(1);
  s = digitalRead(S);
  delay(1);

  Serial.print("   X =  ");
  Serial.print(x,DEC);
  
  Serial.print("   Y =  ");
  Serial.print(y,DEC);
  
  Serial.print("   S =  ");
  Serial.println(s,DEC);

  delay(100);
}

When I used MICRO, I just changed some “Serial” parts to “Serial1”!

Please help me!