Arduino mega serial 1 writing newline

Hi,
I have a serial device connected to serial1 on my mega.
I uploaded the multiple serial example to my mega.
If i type in the arduino ide serial terminal the command: PS=1
The device connected to serial 1 responds as it is supposed to. So far so good.

Next step: dont type the command in the serial window, but put it in the sketch.

This is the sketch i have made:

void setup() {
  // initialize both serial ports:
  Serial.begin(9600);   // PC
  Serial1.begin(9600);  // OTG
  Serial.print("Program started: ");
  
  // Enable print summary
  delay(1000);
  Serial1.write('PS=1\r\n');
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte); 
  }
  
  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte); 
  }
}

The problem is, the slave device does not responds to this command while it does when i type the same command in the terminal.

I have tried serial1.println, serial1.write("PS=1")
serial1.write("PS=1\r\n") etc etc. It does not seem to work. I think it has something to do with NL and CR

Can someone please help me with this problem? This is the first time i try to work with multiple serial devices.

So the summary of my question:
How do i send the same data over the serial1 port using code, as what's send when i type in PS=1 with NL and CR enabled.

Serial1.write('PS=1\r\n');

Double quotes for a string

AWOL:

Serial1.write('PS=1\r\n');

Double quotes for a string

I have tried quotes and double quotes. Both are not working.
Tried it on multiple lines like:

    Serial1.write('PS=1');
    Serial1.write('\r');
    Serial1.write('\n');

For some reason it does not has the same result as typing it in the serial monitor.
Btw. If i type in PS=1\r\n with NL and BR disabled, it's also not working

Serial1.write('PS=1');

Double quotes for a string

Double quotes = " (one letter)
Two single quotes = '' (two letters)
They look almost the same in some typefaces, so lets look at it in the code window

Double quotes = "  (one letter)
Two single quotes = '' (two letters)

AWOL:

Serial1.write('PS=1');

Double quotes for a string

Thanks! I thought i tried all combinations, but you're right.. it had to be:
Serial1.write("PS=1\r\n");

It's all working thanks for the help.