michealE:
i need to send sensor MLX90614 output readings by Bluetooth from arduino nano to arduino mega but it is not working
As yours is a new question I have suggested to the Moderator to move it to its own Thread.
Please tell us in as much detail as possible what happens when you run your programs and what you want it to do that is different.
"not working" does not provide any useful info from which to help you.
There is no reason to use SoftwareSerial on a Mega when it has 3 spare HardwareSerial ports.
You may find something useful in Serial Input Basics - simple reliable ways to receive data.
...R
PS ... When posting code please use the code button </>

so your code
looks like this
and is easy to copy to a text editor See How to use the Forum