Project on zigbee 2 way communication

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

can i use 2 void mains one for sending data and reciving

i have attached the transmission and reception code and the setup

IMG-20150827-WA0011.jpg

sketch_jul04a.ino (1.2 KB)

switch_multiple_led.ino (1.31 KB)

What kind of XBees are they? How are they configured?

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

What part of that is challenging?

i need help in urgence

When is our homework due?

can i use 2 void mains one for sending data and reciving

They are functions, not voids. You don't have any main(). No, you can't. You can do everything in loop().

On any given pass through loop(), there may be something to send. If so, send it. On any given pass through loop(), there may be something to receive. If so, receive it.

One module is coordinator other router plz suggest better way.I have 3 days time

Xbee s2 series of ZigBee

Thank you for reply but my question is

if i press a button in board1 the led should blink in board2 i have 4 buttons and 4 leds respectively similararly if i press a button in board2 the led should blink in board3

so both the boards should have transmission and recieving programme i am using xbee series 2 zigbee one is cordinator and one is router

i need is simple there should be 2 way communication i mean to say if i press a button in board1 the led should blink in board2 i have 4 buttons and 4 leds respectively similararly if i press a button in board2 the led should blink in board3