Pages: [1]   Go Down
Author Topic: Xbee series 2 Co-ord & End 2 way communication  (Read 994 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

I have an program that sends and receives data to & from a server via processing.

I have my co-ord connected to the computer via USB and end-device power via mains.

I can get data in to the end-device that is connected with an arduino and led to output the data coming in.

But I'm having problems sending sensor readings back up from the end device?

Must I re-configure my xbees to do this? or is it not possible with my xbees S2's?

thanks in advance.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 935
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It is totally possible with the series 2 XBees.  Depending on how you do it, you may have to reconfigure the XBee.  Can you send anything from the XBee end device to the coordinator?  You may need to give a few more details about what you're trying.
Logged

Trying to keep my house under control http://www.desert-home.com/

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for your quick reply.

From reading down through the xbee related mosts you seem to know your stuff  smiley-wink

Yes I can send sensor data readings from the end to the coord and I can receive data also but not in the same program.


Quote
You may need to give a few more details about what you're trying.

Sure.So i'm creating a pair of cushions that have 2 way communication over the internet.

 I am using Pachube as the server and I am doing all the programming in Processing.

My end devices each have 1 pressure sensor (pin A0) and 1 rgb led ( pin10) & a vibration motor (pin11).

I am using the the xbee shield and currently using 2 uno boards. They are being powered by 9v mains.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could someone give me a quick run through of how to re-configure my xbees for 2 way communication.

From looking at the wireless sensor network books I need to change my ATDL and ATDH. would this be correct?
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 935
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Since you're using the AT command configuration, there's only a few things you need to do.  Take a look at my site draythomp.blogspot.com behind the tab that says "World of XBees" and I describe the things that can cause you trouble getting them to talk.  It's not really hard.  Just pick a pan id, note the addresses of the XBees and start configuring them.  The easiest way to get them talking is to have both of them plugged into the same computer.  If you have the hardware to do this I highly recommend it.  You would need a couple of devices of some type to connect them to the computer and open two instances of XCTU to connect to the XBees and just configure and test away until you understand their interaction.

The very first time I did this I used two arduinos with the XBees connected to them and each arduino was USB connected to a laptop.  Lots of hardware, but it's what I had at the time.   Now, when I experiment I have one XBee to USB adapter and an Adafruit adapter plugged to an FTDI cable.  It's just too convenient to be able to change and test each XBee and immediately see the results.

In direct answer to your question ATDH and ATDL are necessary, but you may have to do a couple of other things as well.

Google is your friend when you're trying this.
Logged

Trying to keep my house under control http://www.desert-home.com/

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok thanks.

I will give this a go and let you know how I get on.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Turns out I didn't have to do any configuring to the chips, it's was just the layout of my code that was preventing the two communication.  smiley-lol

I have another question though, If I wanted to have two arduinos talking directly to each-other (as in no online server or computer) would I need to configure them the co-ordinate device to be an end device?

Basically I want the sensor of Arduino A to control the actuator on Arduino B and sensor of Arduino B to control the actuator of Arduino A.

The reason why i'm asking is because it is for an exhibition and I need a backup plan if the internet fails.

thanks.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49022
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the current setup is to get data from a server, how can that be replaced with getting data from another Arduino?

It can be done, but I don't see how the same sketch can be used when getting data from a server (via Processing) and from another Arduino.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 935
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In ALL cases with XBees, one of the radios, and only one, must be the coordinator.  The others can be either routers or endpoints.  You also must have two of them or there isn't anything to talk to.
Logged

Trying to keep my house under control http://www.desert-home.com/

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the current setup is to get data from a server, how can that be replaced with getting data from another Arduino?

What I meant to say,it would not be running over network, it would fake it by talking to another Arduino locally.

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49022
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If the current setup is to get data from a server, how can that be replaced with getting data from another Arduino?
The sending XBee doesn't know that it is attached to a board that is connected to a PC or attached to a board that is connected to an Arduino.

The receiving XBee can't tell the difference, either.

So, changing the source of the data that is being sent is a matter of connecting the sending XBee to a different data source.
Logged

Pages: [1]   Go Up
Jump to: