i am working on wireless communication using zigbee xbee sries 2 with uno

Hello all

i am working on a project using ardiuno uno and xbee module, the set up is as attached,
i am able to work on one way transmission i mean to say that if i press key on one side the led blink on other side, as per the coding for transmission and reception seperately

i need help on transmission and reception on same code so that it should work on both side i mean to say

1.if i press button on uno board 1 the led on board 2, that is i am send command using zigbee a,b,c,d,e,f

2.if i press button on uno board 2 the led on board 2, that is i am send command using zigbee A,B,C,D,E,F

i need help in urgence

i have 4 buttons and 4 leds respectively

i am using xbee series 2 zigbee one is cordinator and one is router

if i need to write how can i write two functions i have aatched the codes so please if any modification to be done help me ASAP and reply i have attached the code, setup fig all

sketch_aug31a.ino (2.35 KB)

sketch_jul04a.ino (1.2 KB)

switch_multiple_led.ino (1.31 KB)