/ / Introduction
XBee modems are one of the easiest ways to create a wireless point-to-point or mesh network. They have error correction, are configured with AT commands, come in multiple flavors and can create a wireless serial link out of the box.
Other Good things
- low power
- addressing
- cheap (sort of)
- wireless
- small
- standardized
LadyAda's breakout board
- Onboard 3.3V regulator to cleanly power your XBee, up to 250mA
- Level shifting circuitry means that its trivial to connect it to 5V circuitry such as an Arduino without risk of damage
- Two LEDs, one for activity (RSSI), the other for power (Associate)
- 10-pin 2mm sockets included to protect the modem and allow easy swapping, upgrading or recycling
- All the commonly used pins are brought out along the edge, making it easy to breadboard or wire up
- For use with any XBee/Pro pin-compatible module (check your module datasheet to verify power needs)
- Specifically created for use with an FTDI cable to connect to a computer via USB. This means that you can use, configure or upgrade the adapter painlessly simply by plugging in a cable.
- 3V pin - this is either an input power pin (if 5V is not provided) or an output from the 250mA regulator if 5V is provided
- DTR - "Data terminal ready" this is a flow control pin used to tell the XBee that the microcontroller or computer host is ready to communicate.
- RST - this pin can be used to reset the XBee. By default it is pulled high by the 10K resistor under the module. To reset, pull this pin low.'
- Ground - common ground for power and signal
- CTS - "Clear to Send" this is a flow control pin that can be used to determine if there is data in the XBee input buffer ready to be read
- 5V - this is the power input pin into the 3.3V regulator. Provide up to 6V that will be linearly converted into 3.3V
- RX - This is the XBee's serial recieve pin. Serial data is sent on this pin into the XBee to be transmitted wirelessly
- TX - This it the XBee's serial transmit pin. Serial data is sent on this pin out of the XBee, after it has been transmitted wirelessly from another module
- 0 RTS - "Ready to Send" this is a flow control pin that can be used to tell the XBee to signal that the computer or microcontroller needs a break from reading serial data.
- see pin #1
By far the easiest way to connect to a computer is to use an FTDI cable - use either 3.3V or 5V. These cables have a USB to serial converter chip molded into them and are supported by every OS. Thus configuring or upgrading or connecting is really trivial. Simply plug the cable into the end of the module so that the black wire lines up with GND. There is a white outline showing where the cable connects.
Make one now: LadyAda's breakout board
AT commands
How to write an AT Commands
AT+ASCII+ SPACE+ parameter(hex)
AT->OK ATMY ->my address ATDH.ATDL ->destination address hi/of-destination of ATID->personal area network ID ATCN->end command mode ATD0..D8->set pins ATDX0-disabled ATDX1-undefied ATDX2-analog input ATDX3-digital input ATDX4-digital output low ATDX5-digital output high ATIR->sets sample rate in milliseconds -sampling local pin (10times per second) 0x14 ATIT->how many samples to collect ATP0-P1->PWM configuration ATPX ATIU->1/o input enable (UART) ATAI->I/O input address-what address do I want to pay attention to? who do I want to be paired with
Each radio needs an address of its own. Need your own personal area network panid
ATMY7 (number for this xbee)
ATDL8-who you are talking to
Talking to xBee
Once you have the XBee connected to a computer, you can experiment with connecting, configuring and upgrading the modules to the latest firmware.
- With the FTDI cable, connect the module to your computer. If the module has correct power, the green LED should be blinking. If it isn't, check the wiring and verify that the XBee is getting power.
- need to figure out which serial port you are using. Plug in the FTDI cable, USB adapter, Arduino, etc.
Open XBee_Terminal_Max.app - You want to configure for 9600 bps, 8 bit, No parity, 1 stop bit and no flow control
-
Now type in +++ (three plus signs) in quick succession. If the XBee is connected up properly you will get an OK in response
- If you got an OK that means the XBee is powered and wired up correctly! If its not working, check:
- Try again, be sure to wait 10 seconds between each attempt at typing in +++ and type the +'s quickly
- Is the module powered? Green LED should be blinking
- Are RX & TX swapped?
- Do you have the correct baud rate? By default it should be 9600 baud 8N1 no hardware handshake but if it has been used for something else the baud rate might be different.
- Try again, be sure to wait 10 seconds between each attempt at typing in +++ and type the +'s quickly
-
Next try typing in +++ (receive OK) and then AT and press return to get another OK This is basically how you can configure the XBee, by sending it AT commands (they all start with AT for ATtention). After a while, the XBee times out of configuration mode and goes back to pass-through connection mode. So if you want to get back to config mode, just type in +++ and it will start responding again.
- Using terminal, you can change the baud rate using the ATBD command with a number afterwards that selects which baud rate to use:
- 0 = 1200
- 1 = 2400
- 2 = 4800
- 3 = 9600
- 4 = 19200
- 5 = 38400
- 6 = 57600
- 7 = 115200

+++ (get into AT mode) <- OK AT (check if xbee modem is responding) <- OK ATBD (get current baud rate as above) <- 3 (9600) ATBD 4 (set baud rate to 19200) <- OK ATBD (check again) <- 4 ATWR (write the baud rate change to flash) <- OK
- Reset the module, either by pulling the reset pin low for a second or removing power (unplugging cable, etc) To connect now, set the terminal to use 19200 baud, otherwise the module will not respond! You can set it back to 9600 baud by giving it the command ATBD 3 and then ATWRiting it to the flash
Point-to-Point
The most basic way to communicate using the XBee modems is point to point. That means one modem communicating with another modem. Serial data goes in one XBee, is transmitted wirelessly, and goes out the other & vice versa.
Since you all have xbees, you need a way to set the the network ID (otherwise known as the PAN - Personal Area Nework - ID) to unique values. By default all XBee's use PAN ID #3332. The ID is 4 bytes of hexadecimal and can range from 0000 to FFFF.
Changing the PAN is easy.
- Open the terminal program
-
Configuring the Xbee Module
To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least one second before and after during which you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.
Send Command Expected Response +++OK<CR>Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the 'ATID command:
Send Command Expected Response ATID<enter>3332<CR>To change the network ID of the module:
Send Command Expected Response ATID3331<enter>OK<CR>Now, check that the setting has taken effect:
Send Command Expected Response ATID<enter>3331<CR>Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again), use the ATWR command:
Send Command Expected Response ATWR<enter>OK<CR>To reset the module to the factory settings, use the ATRE command:
Send Command Expected Response ATRE<enter>OK<CR>Note that like the other commands, the reset will not be permanent unless you follow it with the ATWR comamand.
-> AT (check if xbee modem is responding) <- OK -> TID (get current PAN) <- 3332 (default, or something else) -> ATID 3137 (set new id) <- OK -> ATID (check again) <- 3137 -> ATWR (write the change to flash) <- OK
- Connect the xBee to the Arduino.
For the first exercise the computer is going to talk to an Arduino.
-
Start by first setting up the PAN ID and baud rate of baud rate of 9600 for the two modems.
-
Connect one module to your microcontroller. First connect +5V and Ground to provide power. Make sure the XBee's green LED is blinking.
- Next connect the RX line (input) of the XBee to the TX line (output) of the microcontroller and vice versa.
- For the Arduino below you will be using a "Software Serial" program and use pin #2 as the RX and pin #3 as the TX. This allows you to use the default hardware USB serial port without conflicting.
- Connect the other module to a computer using an FTDI cable or similar.
- Open up a terminal to the computer's XBee and start typing into it - whatever you want. You should see the red LED on the other modem light up, indicating data is being received. If you don't see the red LED light up, check that you have compatible modules, matching baud rates and PAN IDs.
- Upload the sketch to Arduino:
#include <NewSoftSerial.h> NewSoftSerial mySerial = NewSoftSerial(2, 3); void setup() { pinMode(13, OUTPUT); Serial.begin(9600); Serial.println("Goodnight moon!"); // set the data rate for the SoftwareSerial port mySerial.begin(9600); mySerial.println("Hello, world?"); } void loop(){ if (mySerial.available()) { Serial.print((char)mySerial.read()); } if (Serial.available()) { mySerial.print((char)Serial.read()); } delay(100); }
This will set up a point-to-point 'tunnel' between the two XBees. What is typed into the terminal at the computer will end up in the Arduino's Serial Monitor.
//Glove
Here's an example that uses xBee without Arduino:
Glove A:
ATRE,ID3456,MY1,DL2,IR64,IT1,D73,D45,IA2,WR
Glove B:
ATRE,ID3456,MY2,DL1,IR64,IT1,D63,D45,IA2,WR
ATDL is the xBee to be communicated with-the Destination Address
ATIR command is used to set/read the sample rate. When set, the module will sample all enabled DIO/ADC lines at a specified interval. This command allows periodic reads of the ADC and DIO lines in a non-Sleep Mode setup. Example: When IR = 0x0A, the sample rate is 10 ms (or 100 Hz).
ATIT and ADC samples to collect before transmitting data. One ADC sample is considered complete when all enabled ADC channels have been read. The module can buffer up to 93 Bytes of sample data. Since the module uses a 10-bit A/D converter, each sample uses two Bytes. This leads to a maximum buffer size of 46 samples or IT=0x2E.
When Sleep Modes are enabled and IR (Sample Rate) is set, the module will remain awake until IT samples have been collected.
ATD7 command is used to select/read the behavior of the DIO7 line (pin 12). Options include:
- CTS flow control
- Analog-to-digital converter
- Digital input Digital output
| Parameter | Configuration |
| 0 | Disabled |
| 1 | CTS Flow Control |
| 2 | n/a |
| 3 | DI |
| 4 | DO low |
| 5 | DO high |
D0 - D4 (DIOn Configuration) Commands The D0, D1, D2, D3 and D4 commands are used to select/read the behavior of their respective AD/DIO lines (pins 20, 19, 18, 17 and 11 respectively). Options include:
- Analog-to-digital converter
- Digital input
- Digital output
| Parameter | Configuration |
| 0 | Disabled |
| 1 | n/a |
| 2 | ADC |
| 3 | DI |
| 4 | DO low |
| 5 | DO high |
The ATIA command is used to bind a module output to a specific address. Outputs will only change if received from this address. The IA command can be used to set/read both 16 and 64-bit addresses. Setting all bytes to 0xFF will not allow the reception of any I/O packet to change outputs. Setting the IA address to 0xFFFF will cause the module to accept all I/O packets.
The ATWR command is used to write configurable parameters to the RF module's nonvolatile memory. Parameter values remain in the module's memory until overwritten by subsequent use of the WR Command.
If changes are made without writing them to non-volatile memory, the module reverts back to previously saved parameters the next time the module is powered-on.
- Analog inputs activated
- ATD0 2
- ATD1 2
- ATD2 2
- Sample rate 80 milliseconds: ATIR 50
- 1 sample per transmission: ATIT 1
/ /Arduinos
You will need 2 XBee adapter kits, 2 matching-protocol XBee modules, an FTDI cable (or other FTDI breakout board, if you can wire it up correctly) as well as a 0.1uF ceramic capacitor, 10Kohm resistor and NPN transistor. The resistor and capacitor can vary quite a bit if you dont have exact value Step 1. Configure the transmitter One XBee will act as the 'reset transmitter', it will be attached to the computer via an FTDI cable and wireless send programming commands to the receiver. Lets set this one up first Connect up the transmitter adapter with XBee modem to your computer using the FTDI cable Once you've connected/tested that you can communicate with the modem, go to the configure tab and read in the current setup Then set the following: The PAN ID should be some 4 digit hex number that will only be used by these two modems - to prevent confusion Set the baud rate to 19200 if you're using an Arduino with a 168 chip. You can check your Arduino documentation to figure out which baud rate to use. Or 57600 if you're using a more recent Arduino with '328p chip Next we'll set the Packetization Timeout. This is what determines how long to wait before sending the characters over. We're doing some 'bulk transfer' when sending 10K programs over, so you'll probably want this number high like 10 Set pin D3 to be a digital input And set the Digital IO change detect to FF. Technically you can set it to 0x08, which is the mask to listen for only D3 but this certainly works fine. Now the transmitter is set up to send the current status of pin D3 to any listening modems. Now solder in a tiny jumper between the RTS pin and D3. This will tie the status of D3 to the status of the RTS pin which is can be configured to be used as the 'arduino reset pin' Finally setup the FTDI cable so that the RTS pin will reset the Arduino. For Mac/Linux it will already be done but if you're using Windows you'll need to make a slight change to the driver preferences. In the Device Manager, select the USB COM port Set RTS On Close is selected. Click OK. Configure the receiver Now we will set up the other XBee so that it will listen to changes on pin D3. Connect it to the FTDI cable and read in the current configuration just like the first one. The PAN ID should match the transmitter's Set the baud rate to match the transmitter Next we'll set the Packetization Timeout. This is what determines how long to wait before sending the characters over. We're doing some 'bulk transfer' when sending 10K programs over, so you'll probably want this number high like 10 Set pin D3 to be a digital output, default high. Set the I/O Output to Disabled. This will prevent the receiver from displaying the status update in the serial line and instead just toggle the matching pin. Finally, set I/O line passing input address to FFFF. If you set up unique addresses for the receiver and transmitter xbees, of course you should change this to match but FFFF will match all addresses. Wire up the receiver The transmitter XBee connects directly to the FTDI cable/computer and the receiver is wired to the target Arduino. Here I use a half-sized breadboard and rubber band since not much space is necessary. Solder a wire from pin D3 on the receiver XBee adapter, so that you can plug it into the breadboard. This is the mirrored reset line from the transmitter Xbee.
xBees are pretty weak and dont have the oomph to reset an Arduino on their own, so we need to wire it up to a transistor which will do the heavy lifting of pulling the reset line down. Pretty much any small NPN transistor will work just fine here. Put a 0.01uF to 0.1uF capacitor in series with the wire from the XBee, and connect the other side to the NPN transistor base. The emitter of the transistor connects to ground. Put a resistor around 10K between the base and emitter. This will pull down the base to keep the Arduino from resetting accidentally.
The collector then goes the Arduino's reset line. Make sure the grounds are all connected, and that the XBee is wired from the Arduino's 5V line
Now power the Arduino either through the USB cable or from a DC supply. That's it! Now you can reprogram it and also watch the serial monitor from more than 100 feet away. Don't forget the serial monitor -must- be at the same baud rate as programming because the XBees can only talk at their configured baud rate.You can also use AVRdude 'out of the box' which I prefer because you get a nice little progress bar. Simply go to the directory where your sketch is stored and look for the .hex file in the applet subfolder
/ /Connecting two Arduinos
- On the sender Arduino wire up a potentiometer. Program this Arduino so that the values are read and sent through the serial port.
Use the map function to limit your input from 0-255:When you send serial data, send it as BYTEyour_var=map(your_var, 0, 1023, 0, 255);
Serial.println(your_var,BYTE); - On the receiver Arduino program wire up one Led. Program this Arduino so that the LED's intensity will change accordingly the pot value.
To receive Serial use this code:if (Serial.available()) { // set the values to the incomingByte variable incomingByte = Serial.read(); } - Upload your programs
-
Connect the Arduinos
Tx on Arduino#1 -> connect to -> Rx on Arduino#2
Rx on Arduino#1 -> connect to -> Tx on Arduino#2
-
Test the program
And Again, but Wirelessly
- Here is your sender code:
int analogValue, val; void setup(){ // start serial port at 19200 bps Serial.begin(19200); } void loop(){ // read analog input analogValue = analogRead(2); // remap values val = map(analogValue, 0, 1023, 253, 0); //SYNC char Serial.print(254, BYTE); Serial.print(val, BYTE); delay(150); } - Here is your receiver code:
#define ledPin 9 byte incomingByte, sensor; void setup() { // start serial port at 19200 bps Serial.begin(19200); Serial.println("Ready!"); // led pins pinMode (ledPin, OUTPUT); delay(1000); } void loop() { // are there any bytes available on the serial port ??? if (Serial.available()) { // assign bytes to the var incomingByte incomingByte = Serial.read(); Serial.print(int(incomingByte)); if ((int(incomingByte) == 254)) { sensor = Serial.read(); Serial.print("Sensor 1 = "); Serial.print(int(sensor1)); } } analogWrite (ledPin, sensor); } - Wiring up sender:
- Arduino TX goes to Xbee RX and Arduino RX goes to Xbee TX.
- Power and GND to the pot.
- Analog Pin 2 to Pot
- For the Receiver:
- Arduino TX goes to Xbee RX and Arduino RX goes to Xbee TX
- Digital Pin 9 connected through resistor 1 to positive end of the LED. GND to the negative end.
/ / Materials Needed
- 1 x Xbee chip
- 1 x 74lvc245 (5V to 3.3V buffer) 1 x 74hc245 buffer
- 1 x 10k resistor
- 1 x piezo 1 x switch
- 1 x 9V power supply, AC adapter or battery 1 x 3.3V voltage regulator
/ /Assignment
You need to do the following for this assignment:
- Write a song
- Wire a circuit so that you interface the Arduino and Xbee.
- When a switch is pressed on your circuit, send your song wirelessly to other xbee chips.
- When a song is received from another group, play their theme song on your piezo.
When the button on your Arduino is pressed, your song should send to other groups and play on their Arduinos. Otherwise, you will be waiting to receive from others. Every group will send, receive, and play songs on their piezo.
Everyone will need to follow the same protocol in order to communicate with each other.
Protocol:
Baud rate 9600
PAN (personal area network) ID number 0x1234
You must include the following code in your program:
byte names[] ={'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C'};
int tones[] = {1915, 1700, 1519, 1432, 1275, 1136, 1014, 956};
digitalWrite(speakerOut, LOW);
for (count=0;count<=8;count++) {
if (names[count] == val) {
digitalWrite(speakerOut, HIGH);
delayMicroseconds(tones[count]);
digitalWrite(speakerOut, LOW);
delayMicroseconds(tones[count]);
}
}
Have fun writing a song that will be recognizable and distinctly your own. A minimum of 20 notes and at least one pause is required per song.
Read the Xbee product manual to figure out how to communicate with it from Arduino.
/ /Common Mistakes
Your XBee project isn’t working? Here’s some common mistakes that both beginners and experts make:
- Not using the latest firmware (especially if ATD0 or ATIR is giving an error)*
- No reference voltage to VREF pin on the 802.15.4 radios (analog and digital reads give wrong values)
- Forgetting that AT commands use hexadecimals
- Hitting return after +++ (or otherwise not respecting 1 second default guard time)
- Conversely, _not_ hitting return after an AT command
- Letting the XBee time out of command mode before issuing an AT command (you’ll know because you get no response)
- Forgetting to write the configuration to firmware with ATWR (unless your application configures the radio interactively)
- Not using ATRE (restore factory defaults) before re-configuring a previously used radio (previous settings lurk unless you manually reset them all)
- Looking for analog output on the analog input pins instead of pins 6 and 7 (P0, P1)
- Using a voltage regulator without decoupling capacitors (10uF on input, 1uF on output is good)
- Mixing up TX and RX pins (fastest way to check this is switch the wires and see if it starts working)
- Using ZigBee version (ZB Pro or ZNet 2.5) when 802.15.4 version would do just fine (if you don’t need to make a mesh network)
- Trying to read more than 1.2 Volts on the ZB Pro and ZNet 2.5 analog inputs (that’s the limit)
- Buying Pro radios when you don’t need them. (Cost more, bigger, use a lot more battery)
- Deciding the XBees are flaky. (You may not be using them correctly, but they are very reliable)
- Deciding an XBee is burned out when it’s set to a different baud rate (check ON and ASSC lights)
- Deciding an XBee is burned out when it is just sleeping (Check ON light to see if it blinks occasionally)
- Forgetting to supply power or ground (ON light may go on and ASSC light may blink but both will be significantly dimmer)
- Not contacting Digi sooner for support, especially if your radio seems dead or you keep getting an error you don’t understand.
- Sending continuously without any delay (try 10ms delay)
- Not removing RX and TX connections before uploading code (Arduino will give an error)
- Not removing RX connection when reseting, if you are continuously receiving data. (Arduino will never reset)
- Hooking up more than 4 Volts to the 3.3V pin
- Using switches without pull-down resistors (but not if you use the internal pull-ups)
- Not using a pull-up or pull-down resistor on pins 5 and 7 (these don’t have internal pull-ups at all)
- Using sensors without voltage divider resistors (if your sensor needs that circuit)
- Using too-resistive conductive thread for power and ground (try fabric or wires)
/ /Lilypad
The LilyPad XBee is a radio transceiver that you can sew on to your clothing to create wireless wearables. It was created by Kate Hartman and Rob Faludi. It sold by Sparkfun Electronics as an addition to Leah Buechley’s extensive line of wired LilyPad clothing components.

To use the lilypad, you need:
- XBee 802.15.4 OEM Module, Chip Antenna (30-100 m range)
- LilyPad XBee, http://faludi.com/lilypad
- Alligator clips
- 9 Volt battery or 3.3 - 3.7 Volt battery
- FTDI cable for programming with angle headers
SETUP
There are two ways you can attach your XBee radio to the Lilypad XBee:
- With female headers: This is how the board ships, and is a great setup for prototyping. You can easily swap out your radios to work with different models and antenna types.
- Soldered directly to the board: This is for projects that are more in their final stages, where you know you won’t be swapping your radios. This secures the radio to the board and reduces the profile of your board tremendously, making it nice and slim so it lies nicely in your clothes! With the current version of the board, you’ll need to desolder and remove the female headers.
Pin layout is similar but not the same as the pin layout on the XBee. Certain pins have been swapped to make sewing easier in projects that use the LilyPad Arduino, which has a different pin arrangement from the XBee.
PIN LIST
Counter-clockwise from the top. Descriptions are for the 802.15.4 XBee and XBee Pro, but other versions are similar:| Label | Description | XBee Pin |
|---|---|---|
| 3.3V | CONNECT REGULATED POWER ONLY, NOMINALLY LIMITED TO 3.4 VOLTS | 1 |
| — | gnd | 10 |
| rx | data in | 2 |
| tx | data out | 3 |
| d08 | digiat output 8 | 4 |
| rst | reset | 5 |
| rssi | receivved signal strength indicator/PWM out | 6 |
| pw1 | PWM/output 1 | 7 |
| nc | no connection | 8 |
| slp | Sleep/digital in 8/DTR | 9 |
| + | connect unregulated voltage here | |
| — | gnd | 10 |
| d4 | analog in 4/digital input/output 4 | 11 |
| d7 | digital input/output 7/CTS | 12 |
| on | ON light output | 13 |
| vrf | Voltage reference for analog/digital inputs | 14 |
| asc | association light output/analog input 5/ digital i/o 5 | 15 |
| d6 | analog input 6/digital i/o 6/RTS | 16 |
| d3 | analog input 3/digital i/o 3 | 17 |
| d2 | analog input 2/digital i/o 2 | 18 |
| d1 | analog input 1/digital i/o 1 | 19 |
| d0 | analog input 0/digital i/o 0 | 20 |
POWER SOURCES
Lithium Ion coin cells connected to the 3.3V and — pins (#2450 or larger recommended)Lithium Ion battery packs connected to the 3.3V and — pins
COMMON QUESTIONS ABOUT THE BOARD
- What is a solder jumper?
-
Solder jumpers are really just a blob of solder that connects two pads together, completing a circuit. They form a semi-permanent connection, but can be removed with a simple soldering iron and a bit of solder wick. Later, they can be replaced to re-form the connection. This cycle can be performed repeatedly, though ideally not very often because eventually it will weaken the board. There are two solder jumpers on the LilyPad XBee board. One is by the d1 pad that completes a circuit for the LED lights and another by the vref pad that routes the supply current to the Voltage reference pin.
- Why do lights have solder jumpers?
-
Sometimes you don’t want blinking lights on your board. Removing the upper solder jumper, by the d1 pin will disable both the ON and RSSI LED light.
- Why does VRef pin have a solder jumper?
- The Voltage reference pin tells the XBee what Voltage to set as the maximum level when reading an analog sensor. In most cases this will be the same as the XBee’ supply voltage so the jumper can be left in place. However, if you are using a different voltage for an analog sensor, then this jumper can be removed and that different voltage can be routed to the VRef pin.
Keep in Mind
- Never send more than about +4 Volts to the 3.3 pin. Use the + pin instead
- Conductive thread may be too resistive for power and ground, try fabric or wire
- XBee TX goes to Arduino RX and vice versa
http://lab.guilhermemartins.net/serial-comunication-with-xbee-arduino/