bluetooth HC-05 master and slave devices

I had a problem with conecting master and slave devices of HC-05 bluetooth modules (both of them). when i was giving master module the address of slave which was 13:EF:8562, AT mode was outputing error(7) then i added zeros like 0013:EF:008562, it conected and after checking AT+BIND? said that the address of conected device module was 13:EF:8562. i changed rx-rx and tx-tx to rx-tx and tx-rx, disconect enable pin and modules started blinking synchronized. i guess it worked.

also i set serial monitor to 38400 baud but after typing AT+UART? it gave me output +UART:9600,0,0

now i have slave module on arduino uno and LED in pin 13, master module on arduino mega and simple switch on/off button conected to pin 7. i have no idea how to write code for that 2 arduinos so when the switch button of master arduino is on the LED turns on too. (case switch is off LED turns off). i hope you can help me. thank you.