i have 2 arduino boards and i want 1 to connect to the computer nd the other to send infomation to the one connected to the computer. And when i add new boards i want tem to do the same to setup a type of sensor network.I am new to arduino and xbee but i can lear fast i have been with lost of other microcontrolers.
What kind of XBees do you have? How have you configured them? How much data is each one supposed to send? How often? How will you deal with two or more XBees transmitting at the same time?
Generally, it is easier to have the coordinator poll the end devices, to avoid having two end devices transmitting at the same time. This is difficult to manage, though, when the end-devices appear to be able to come and go at will.
i have the S1 xbee's and i want them to send small amunts of data such as temp but for now i just want them to send anything untill i get my temp sensors
Series 1 radios are point to point. One radio talks to one radio (or to several in broadcast mode). They are not the proper radios to use to form a network.
On the other hand, if you only intend that one XBee act as coordinator, and be connected to the PC, then it can broadcast a request for data, and all the XBees will get the request and reply. Crosstalk is going to be a real problem.
There are ways to make the coordinator change the DL address that it is talking to, programatically. That would let the coordinator talk to a number of XBees, one at a time.
How many XBees do you have? How are they configured? How are they connected to the PC and Arduino(s)?
The XBee broadcasts anything is sees on its TX pin, and puts anything it receives over the air on its RX pin. Whatever you have the TX and RX pin connected to can use Serial, or NewSoftSerial, to talk to the XBee.
It's hard to tell from that photo how things are connected, since the Xbee doesn't fit the breadboard, and it doesn't appear to be mounted on anything that would fit the breadboard. But, if the TX and RX pins are connected to the Arduinos TX and RX pins, sending text to the XBee to transmit is a simple matter of using Serial.print(). On the receiver, use Serial.available() and Serial.read().
This assumes, of course, that the XBees are properly configured.