Arduino Mega 2560 serial with other device

I need to establish communication between arduino mega 2560 with external serial device called SKPS( Cytron.io - Simplifying Digital Making)
Actually my project is about to control arduino output via PS2 wireless controller, SKPS used as communication bridge between PS2 controller with arduino. SKPS consist of TX,RX,5V,GND and RESET pin that should cross connect to TX and RX pin of arduino.

This is the sample code i done but didt works

//skps protocol
#define p_Up	    4
#define p_Right	    5
#define p_Down	    6
#define p_Left	    7
#define	p_L2	    8
#define	p_R2	    9
#define p_L1	    10
#define p_R1	    11
#define p_Triangle  12
#define p_Circle    13
#define p_Cross	    14
#define	p_Square    15

const int rx= 19;
const int tx= 18;

void setup()
{
  Serial1.begin(9600);      //Set serial baud rate as 9600

  
  //Set the mode for each digital pins whether input or output
  pinMode(rx, INPUT);
  pinMode(tx, OUTPUT);
  
  pinMode(53,OUTPUT);
}

void loop ()
{
   if(skps(p_Up)==0)            //Check whether Up button is pressed
  {
    digitalWrite(53,HIGH);                
  }
  
  else if(skps(p_Down)==0)	//Check whether Down button is pressed		
  {	
    digitalWrite(53,LOW);					
  }
}

unsigned char receive_data(void)  //Function to wait for a byte receive from UART
{
  unsigned char temp;
  while(!Serial1.available());    //Wait until data received
  temp=Serial1.read();
  return temp;                    //Return the received data
}

unsigned char skps(unsigned char data)	//Function to send out a byte via UART
{										
  Serial1.write(data);             //Send new data
  return receive_data();          //Return received data
}

appreciate if someone can help in this

  //Set the mode for each digital pins whether input or output
  pinMode(rx, INPUT);
  pinMode(tx, OUTPUT);

The Serial1.begin() occupied these two pins and shortly after you're re-assigning them to the GPIOs, so the serial interface won't work.

Remove these lines from your code and try again.

i tried to remove the command but still didt works.
I think the command is needed because of the cross connection of external serial device with arduino board

I think the command is needed because of the cross connection of external serial device with arduino board

They are not. Whatever diddling of those pins is needed is done by the HardwareSerial class.

Why are you connecting to the RESET pin? Are you expecting the external device to reset the Mega?

to make things clear, please refer to the picture attached. my main reference of connection.
For this moment i just want to figure out and solve simple serial communication between arduino and external device (SKPS),
As shown in previous programming, i'm trying to light up digital pin 53 after button at PS2 controller pressed.
I didt connect the RESET pin of external device with Arduino, leave it unconnected.
I connect 5V arduino to 5V external device, arduino GND to external device GND, external device TX to arduino RX and external device RX to arduino TX.
I think the connection should be ok but the problem at the communication part

The picture shows a Duemillanove and not a Mega2560. If you connected it like the picture shows, the sketch is wrong (Serial1 instead of Serial). Why don't copy the traffic of Serial1 to Serial for debugging (given you have connected the hardware to Serial1)?