Arduino-Xbee to Explorer-Xbee Communication?

Hi,

Im making a project where I use two Xbees. One of them is connected to a arduino(Duemilanove 328) and the other are connected to my mac trough a USB Explorer card(http://www.sparkfun.com/commerce/produc … ts_id=8687).

I have programmed the Arduino-Xbee to receive messages (Serial.available()), that I send from MAX/MSP trough the Explorer-Xbee to the Arduino. But how do I program the Explorer-Xbee to recieve messages from the Arduino?

Im using Xbee Series 1.

I have set it up like this:

XBEE1:

ATID = 1111

ATMY = 10

ATDL = 11

ATBD = 3

XBEE2:

ATID = 1111

ATMY = 11

ATDL = 10

ATBD = 3

Best,

allegutta

But how do I program the Explorer-Xbee to recieve messages from the Arduino?

Either use a terminal program (like Hyperterm for Windows) or write a MAC application program that interfaces with the USB port.

Hi waltr,

How do I “write a MAC application program”?

And when I have done it, how do I write to the Explorer (which language/commands etc)?

Best,

allegutta

I don’t use MACs just PCs with Windows in which I use Microsoft’s Visual Studio. But I’m sure there are Development Compilers to write code for MACs.

Did you google "How do I write a MAC application program? " and find these links?

http://www.google.com/search?q=How+do+I … =firefox-a

Do you have a terminal program on your MAC?

I believe you have the XBees set-up in ‘transparent mode’ (AP command mode) therefore and serial data into the explorer it just passes this data into the XBee DIN serial pin.

To start and for testing just type what you want to send to the Arduino through the Explorer->XBee->XBee->Arduino. It works exating the same in the other direction. Whatever data the Arduino sends to the Xbee comes out of the Explorer into the MAC’s USB port.

Okey I see, but then I think the problem is somewhere else, because when I send something out on the Explorer from MAX/MSP the TX pin blinks on the Explorer and the LED13 on the Arduino(which I told to blink when Serial.available()) begin to blink(so this communication way works). But when I try to send from the Arduino to the Explorer - nothing happens on the RX pin on the Explorer.

I think there may be a communication problem between those two? (I have double checked that the AT commands are correct).

To send messages from the Arduino I use Serial.print() and Serial.write(), is that right?

Best,

Sigurd

Waltr, I found the problem - it was one old arduino xbee shield I used that messed up things. I switched to this(http://www.sparkfun.com/commerce/produc … ts_id=9588), and now the two xbees communicates!:slight_smile:

But, I now see the RX pin on the explorer blinking when I send information out from the Arduino, but how do I get the signals in to MAX/MSP?

Any idea?

Best,

Sigurd

What is a MAX/MSP?

I cant really explain what it is, exept that it is very(!) intuitive and cool. Check this out: http://cycling74.com/products/maxmspjitter/

By the way, if someone else need to send and recieve serial information fra MAX/MSP to Arduino, this is the way:

MAX Patch:

----------begin_max5_patcher----------

471.3oc2Vs0aCBBE9Y8WAgmcMJds6s86XoYAUlkEEZTLqaM8+9Dn1ao0o0t1

l8BDNGt788cNGfUlFvX9RRED7L3UfgwJSCCkIoAiMiMfE3kI43J0zfBdVVNA

ZocwpKnrbhP4yYmQds3XqZShuVPzGGjxDPvrMdWfEIyorr2JIIB8DP9ASrs.

AdxVjca61kPSU.hG+wSQPoo0llxFqdxj3ZgfytFLIFyx5CUbPg+NWBuDtvHe

1r1VtHHKUGLrfHJ4.Ga6SxRzeCKmpBXA9cQxfV.8NmIX3B0Y.eojhy22SE8a

kGGzD6qmprnrI0CjhE3AD7sOOucCiTQ2Hc9pSWD2+1P75hXR4.XGpqhTqdD6

cQ9ZMP04E0kF30GMnr.q1Z2+Aphth.g5Lyv8NoJEjpJbF4zUIWi6M5Tg71j2

3p5b8zIQmVgP2yKMpHxyAfASCNy0oWVNTupp7Qxtvock+3LJ0QsivbJ63eCn

Pkz9gRVEutLokJ5mfs.6vUJoRPYXAs4A1cyI3f4LmllRX6e2ZAMcAuQW1.Av

rSF95KhB5AhBe3PjyvPDp4cVe4OKrkctMEPsiFIVcu9XcjHB8vgHmdfH+ggn

1HXyWJjwynvsitAX0aDpWyf0l+vSY77k

-----------end_max5_patcher-----------