Pages: [1]   Go Down
Author Topic: True Bidirectional Comms between XBEE's  (Read 1987 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have one XBEE as a transmitter connected to the PC via an adapter board.   The other XBEE is connected to an Arduino Mega-LCD combo  and set up as the receiver.   
I have no problem sending text wirelessly from the PC to the Arduino and displaying it on the LCD.  My transmitting software is written in Visual Basic (VB10).

PROBLEM:    I would like have the Arduino XBEE echo the same text back to the back to the PC as confirmation that things are working.  How do I do this?
Do I need to have to continually  switch Transmitter/Receiver roles between the XBEE's attached to the PC and Arduino???
If so, is there any code that will allow an Arduino to reconfigure the XBEE as either a transmitter or receiver on the fly.  ??

Once I have an example of the code for the Arduino, I will try to figure out how to do the same in VB10. 
I'm more than happy to share any of my code to date. 

NOTE:
I am able to communicate back and forth serially without any problems when I connect the PC and Arduino via a USB cable.  (XBEEs totally removed) so I know my PC software and Arduino code works.   
   

Logged

uk
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Couldn't you set up the xbees in transparent mode (i.e. not API mode), with each of them set to send bytes to each other? That way your remote arduino could send the strings back through its xbee to the one connected to your computer. I think you'd just need to set up DL and DH of the remote xbee to be the SL and SH of the local one.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have one XBEE as a transmitter connected to the PC via an adapter board.   The other XBEE is connected to an Arduino Mega-LCD combo  and set up as the receiver.   
What do you mean?
What modules and how did you set them up?

XBee communication is bi-directional.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33419
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
XBee communication is bi-directional.
But just not at the same time, you have to do some buffering.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But just not at the same time, you have to do some buffering.
True
Logged

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

Thanks for your help. Your information caused me to check the DH and DL values.  Turned out I missed a number in the DL value of one of the Xbees.
Works like a charm now.!!
Logged

Pages: [1]   Go Up
Jump to: