(respectively) of the FTDI chip - data sent from the microcontroller will be transmitted to the computer via
USB as well as being sent wirelessl y by the Xbee module. The microcontroller, however, will only be able
to receive data from the Xbee module, not over USB from the computer.
With the jumpers in the USB position (i.e. on the two pins nearest the edge of the board), the DOUT pin
the Xbee module is connected to the RX pin of the FTDI chip, and DIN on the Xbee module is connected to
the TX pin of the FTDI chip. This means that the Xbee module can communicate directly with the
computer - however, this only works if the microcontroller has been removed from the Arduino board. If
the microcontroller is left in the Arduin o board, it will be able to talk to the compu ter n o rmally via USB,
but neither the computer nor the microcontroller will be able to talk to the Xbee module.
Networking
The Arduino XBee shield can be used with different XBee modules. The instructions below are for the
XBee 802.15.4 modu les (sometimes called "Series 1" to distinguish them from the Series 2 modules,
although "Series 1" doesn't appear in the official name or product des cription).
Addressing
There are multiple parameters that need to be configured correctly for two modules to talk to each other
(although with the default settings, all modules should be able to talk to each other). They need to be on
the same network, as set by the ID parameter (see "Configuration" below for more details on the
parameters). The modules need to be on the same channel, as set by the CH parameter. Finally, a
module's destination address (DH and DL parameters) determine which modules on its network and
channel will receive the data it transmits. This can happen in a few ways:
If a module's DH is 0 and its DL is less than 0xFFFF (i.e. 16 bits), data transmitted by that module
will be received by any module whose 16-bit address MY parameter equals DL.
If DH is 0 and DL equals 0xFFFF, the module's transmissions will be received by all modules.
If DH is non-zero or DL is greater than 0xFFFF, the transmission will only be received by the
module whose serial number equ a ls the transmitting modu le's destination address (i.e. whose SH
equals the transmitting module's DH and whose SL equals its DL).
Again, this address match ing will only happen between modules on the same network and channel. If two
modules are on different networks or channels, they can't communicate regardless of their addresses.
Configuration
Here are some of the more useful parameters for configuring your Xbee module. For step-by-step
instructions on readin g and writing them, see the guide to the Xbee shield. Make sure to prepend AT to
the parameter name when sending a command to the module (e.g. to read the ID parameter, you should
send the command ATID).
Command
Description Valid Values Default Value
ID The network ID of the Xbee module. 0 - 0xFFFF 3332
CH The channel of the Xbee module. 0x0B - 0x1A 0X0C
SH and SL The serial number of the Xbee module (SH gives the
high 32 bits, SL the low 32 bits). Read-only. 0 - 0xFFFFFFFF
(for both SH and SL)
different for each
module
MY The 16-bit address of the module. 0 - 0xFFFF 0
DH and DL The destination address for wireless communication
(DH is the high 32 bits, DL the low 32). 0 - 0xFFFFFFFF
(for both DH and DL)
0 (for both DH and
DL)
BD The baud rate used for serial communication with
the Arduino board or computer. 0 (1200 bps)
1 (2400 bps)
2 (4800 bps)
3 (9600 bps)
4 (19200 bps)
5 (38400 bps)
3 (9600 baud)