Arduino Mega and Arduino Nano connection via RS485

Hello Guys!

I have a problem with my Rs485 communication between my Mega and Nano.
When I use my code between 2 Nano it works perfectly but when I use it between a Nano and a Mega nothing works.

I attach my codes. It’s supposed to read RFID tags and check if it’s valid or not so the program can activate or deactivate an alarm system.

Thanks for your help.

Smart_home_outside_unit_1.ino (7.68 KB)

Smar_home_inside_unit_2.ino (3.11 KB)

Please help me it's important and it drives me crazy :frowning: