Hello everyone,
I have recently been trying to create a network of XBees using my Arduino boards. All of my XBees are using the Adapters sold by Adafruit. I have one XBee connected to an FTDI cable to my computer, another one connected through my Arduino Uno, and the last one connected through my Arduino Yun. The one on the Uno and the FTDI cable work fine. They transmit data back and forth between the two of them perfectly, but my XBee on the Yun is a little troubled. It is having trouble sending and receiving data from the other XBees.
Both of the Arduino XBees are set up identical to this picture. Except without a Due and instead with an Uno and Yun, respectively.
http://www.ladyada.net/images/xbee/ardu ... simple.jpg
Is there some sort of issue specifically with the Yun communicating with an XBee? Maybe in how the Yun handles its serial data? Also, is there anyway to fix this or do I just have to use another board. I would like to keep the Yun for its SD card slot for storing collected data.
Thanks,
Tyler
Xbee + XBee Adapter + Yun Compatibility
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
Does it work a little bit, or not at all?Tresky wrote:It is having trouble sending and receiving data from the other XBees.
So, you have RX and TX connected to Digital 2 and 3? That should work.Tresky wrote:Both of the Arduino XBees are set up identical to this picture.
- tresky
- Posts: 18
- Joined: Tue Sep 18, 2012 12:47 pm
Re: Xbee + XBee Adapter + Yun Compatibility
It is able to send data out to the XBees around it, but not able to receive it. I'm even using the example code provided http://www.ladyada.net/make/xbee/point2point.html both of the Arduinos.Does it work a little bit, or not at all?
Yeah, that's how I have it set up. It works on the Uno, but not on the Yun. :/So, you have RX and TX connected to Digital 2 and 3? That should work.
Does the Yun handle serial data differently in a way that would prevent it from working?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
Switch the XBee module on the Yun for a different module. See if the problem is with the module itself.
- tresky
- Posts: 18
- Joined: Tue Sep 18, 2012 12:47 pm
Re: Xbee + XBee Adapter + Yun Compatibility
It's not the module. Just tried another one; same problem. :/
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
It may be a problem with your particular Yun. There's nothing about the Yun design that would cause this
- tresky
- Posts: 18
- Joined: Tue Sep 18, 2012 12:47 pm
Re: Xbee + XBee Adapter + Yun Compatibility
Hmm... weird. I tried another Yun and got the same problem.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
So much for that theory. What about trying a different pair of pins for RX and TX.
Actually, are you connected to I2C for anything? D2 and D3 are shared with SCL and SDA
Actually, are you connected to I2C for anything? D2 and D3 are shared with SCL and SDA
- tresky
- Posts: 18
- Joined: Tue Sep 18, 2012 12:47 pm
Re: Xbee + XBee Adapter + Yun Compatibility
I am not. I understand that the TX and RX pins on the Yun are used, by the board, for communicating with the Linux Kernal onboard. Could that be interfering in any way?Actually, are you connected to I2C for anything? D2 and D3 are shared with SCL and SDA
I tried using D0 and D1. No luck. :(What about trying a different pair of pins for RX and TX.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
I think D0 and D1 are used for communicating with linux.
Try D8 for RX and D7 for TX
Try D8 for RX and D7 for TX
- tresky
- Posts: 18
- Joined: Tue Sep 18, 2012 12:47 pm
Re: Xbee + XBee Adapter + Yun Compatibility
D7 and D8 didn't work either. :(
I decided to do another little test and just try basics to see if they would work and the board won't even print to Serial. What could that signify?
I decided to do another little test and just try basics to see if they would work and the board won't even print to Serial. What could that signify?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
I have no idea. Have you tried this over at the Arduino.cc forums?
- tresky
- Posts: 18
- Joined: Tue Sep 18, 2012 12:47 pm
Re: Xbee + XBee Adapter + Yun Compatibility
Got an answer from searching around, so I thought I'd share it here for everyone's benefit.
It turns out that the Yun is similar to the Leonardo in the fact that pins 0 and 1, and 2 and 3 don't support change interrupts, so we simply need to use different ports. Ports 8 and 9 seem to work great. :)
It turns out that the Yun is similar to the Leonardo in the fact that pins 0 and 1, and 2 and 3 don't support change interrupts, so we simply need to use different ports. Ports 8 and 9 seem to work great. :)
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Xbee + XBee Adapter + Yun Compatibility
Good find!
Please be positive and constructive with your questions and comments.