project help

im completely noob and i need your help. I want to make a WSN with xbees, sensors and arduino.i want to connect the arduino with the pc and 2 sensors(temp tmp36 and ultrasonic ultrasonic hc-sr04) wireless. i think that i need
2 xbees ,2 shields,usb explorer (for the xbees settings), batteries (for the wireless spot with the sensors) and arduino for the pc. what do you think?

Hi,
Please do not cross post.
What is WSN?

Tom.... :slight_smile:

wireless sensor network

Give yourself plenty of time. Configuring the Xbees can be a complex and time consuming process.
The XCTU program is poorly designed as it requires all decimal and binary settings to be entered in hex.
There is also a complex relationship between some of the settings that is not evident from the user interface.

It is highly recommended that you use CTS handshaking to avoid overflowing the Xbee Tx buffer. Check that the Xbee shield you intend to use has the CTS line connected to an Arduino pin. Some of the adaptors you see on Ebay only have the TX and Rx pins connected.
When the Tx buffer overflows it starts sending garbage data. Sometimes it recovers by itself, sometimes you have to power cycle it.
The Arduino doesn’t have built-in CTS flow control so you’ll have to code that yourself.

Don’t cross-post. Your other thread deleted.

What code do i have to use in order to get measurements from the 2 sensors at the same time?

nick8:
What code do i have to use in order to get measurements from the 2 sensors at the same time?

How closely synchronised do the reading need to be, for example, within 10 seconds, 1 second or 0.1 second?

i want to get measurements from the ultrasonic sensor(parallax ) every 30 sec for 2 seconds and from the tmp36 sensor every 20 sec.how do i have to connect the sensors with the xbees?

Every 30 seconds for 2 seconds? I think you may need a time machine for that.

nick8:
i want to get measurements from the ultrasonic sensor(parallax ) every 30 sec for 2 seconds and from the tmp36 sensor every 20 sec.how do i have to connect the sensors with the xbees?

Connect them like this
Sensor - Arduino - Xbee - Xbee - Computer

Did the CTS I talked about in post #3 make any sense to you? If not then you have a long journey ahead of you. It would probably be a good idea to tackle some simpler projects before you dive into the world of radio communications. As a first step do a Google search for "tmp36 Arduino".

i got this adaptor. is it possible to have 1 spot the pc with xbee and arduino and into an other spot the 2 sensors with xbee and 2 AA batteries