Pages: [1]   Go Down
Author Topic: Xbee interface  (Read 500 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 104
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi-

I expect two xbee shields to be delivered today. I already have the xbees.

One thing I am worried about is I don't really know how to send signals through them. Does anyone have expirience with them? Do you just send serial commands or is it far more complex than that. The xbees are two series 1 wire antennas.

Anyway it would be helpful if someone could help me get a simple Serial link established, (maybe an example)

Thanks in advance.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 653
Posts: 50890
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I expect two xbee shields to be delivered today.
Which ones?

Quote
I already have the xbees.
Again, which ones?

Quote
One thing I am worried about is I don't really know how to send signals through them.
How to send signals to them depends on what kind of signals you are talking about, and how the XBees are configured and connected.

If the TX pin of the XBee is connected to the TX pin of the Arduino, and the RX pins are connected, sending data to the XBee is simple - use Serial.print(). Getting data from the XBee is equally simple - use Serial.read().

If the XBee TX and RX pins are connected to other pins, use NewSoftSerial (pre 1.0) or SoftwareSerial (1.0 or later), or Serial1, Serial2, or Serial3 if you have a Mega and the XBee is connected to another hardware serial port.
Logged

Oxford, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ZigBee is a really cool standard and the best advice I can give you is to read this book - Building Wireless Sensor Networks with ZigBee, XBee, Arduino, and Processing - published by O'Reilly - it contains most of what you will need to know to get started, including command and API modes with hardware and code examples.
http://shop.oreilly.com/product/9780596807740.do
Logged

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

The O'Reilly book is excellent.

The answers to some of your questions depend on whether you are you are using Series 1 or Series 2 XBees.

If series 2, there is some setup you will need to do.  I found the usb xbee explorer to be invaluable for this, but the Oreilly book (and even its on-line previews) contains instructions on how to use the ftdi chip in the arduino to access the needed pins.

If series 1, the devices will talk among themselves right out of the box, most likely. 

Basically, once set up in default "transparent" mode, the bits that go onto one xbee come out the other and vice versa.

There are several flavors of shield.  Sparkfun has one that is the size of the Arduino.  There is another one that is smaller with the xbee offset.

One thing to pay attention to is that if the XBee is sitting on the serial chip on the Arduino, you cannot program the Arduino.  There is a switch on the Sparkfun shield that lets you change pin assignments (slide toward the USB cable to move the xbee to different pins), so that is easier than pulling the shield from the board.

Hope this gets you started.
Logged

Pages: [1]   Go Up
Jump to: