How to display Serial.write() content in LCD Display?

I want to display the content of Serial.write in LCD module. Suggest me how to do this?

#include <SoftwareSerial.h>

SoftwareSerial mySerial(9, 10);

void setup()
{
  mySerial.begin(9600); // Setting the baud rate of Software Serial Library  
  Serial.begin(9600);  //Setting the baud rate of Serial Monitor 
 }
 void loop()
{
    
 if(mySerial.available()>0)
  {
  Serial.write(mySerial.read());
  }
}

That all depends on the display you use.... But in general, save the read to a variable and write it to the display and the serial...

You have a serial LCD attached to the hardware serial (pins 0 and 1)? The way that I read your code, you read from the software serial and write that to hardware serial. We really need to see a data sheet of the LCD and a picture or clear description of your wiring.

Serial.write() is for sending binary data. Serial.print() is for converting a value to a string and sending the string representation to the device.

Why do you want to use write()?

PaulS:
Serial.write() is for sending binary data. Serial.print() is for converting a value to a string and sending the string representation to the device.

Why do you want to use write()?

From the looks of his code that he attached, he is echoing another serial line. Perhaps the data is already in ascii and if he uses print it will give him the ascii representations of his ascii codes.

ie, the device on the Soft serial line sends '1' so that gets sent over as 49. Then you call print to echo that and print sends out 52 and 57 so what you see on the screen in "49". Whereas write would just send the 49 and would be displayed as "1".

From the looks of his code that he attached, he is echoing another serial line. Perhaps the data is already in ascii and if he uses print it will give him the ascii representations of his ascii codes.

If the data is character data, in ASCII format, Serial.write()ing the int that read() returns is NOT going to result in what OP expects.

Is there even an overload of write that takes an int?

But good point either way. Perhaps a cast to char is in order.

I think what really needs to happen is that the OP needs to come back and tell us what he expects this code to do and how that differs from what is actually happening. Otherwise we are just guessing.