
Arduino Wireless Xbee
I have set this post up as an introduction to using the Xbee devices with Arduino. As a beginner, I found it confusing at first to get started so I hope this post will help others to get up and running a little easier. The first place I checked out was Adafruits tutorials for the Xbee Adapter that she sells.
Once you have your Xbee’s configured you can follow this setup and use the sketches that I have provided below (Thanks to Guilherme Martins) and you should be able to be up and running fairly quickly. You can view a larger (1024×768) version of this photo on my Flickr page which will help you see the hook-ups easier.
What You Will Need:
- 2 Arduinos, We used a Arduino Duemilanove and a Adafruit
- Boarduino
- Breadboard and Regulated Power
- 2 Potentiometers
- 2 Xbee Pro Devices
- 2 Xbee Adapter Kits
- Protoshield with Mini-breadboard
- 2 LED’s
- Hook-up Wire
- Portable Power for 2nd Arduino
The Arduino Duemilanove is the “receiver” and the Boarduino is the “sender”. To not cause an error, upload both sketches to the Arduinos before hooking anything up.
For the Sender: we hook up +5v power and GND to the Boarduino and again to the Xbee adapter.
1. Boarduino TX goes to Xbee RX and Boarduino RX goes to Xbee TX.
2. Power and GND to each of the Pots.
3. Analog Pin 2 to Pot 1
4. Analog Pin 5 to Pot 2
For the Receiver: plug in your protoshield to the Arduino and place the Xbee on top. Position this so that you have room in front and behind the adapter to hook up wires to. Connect +5v power and GND from the protoshield to the Xbee adapter.
1. Arduino TX (D1 on shield) goes to Xbee RX and Arduino RX (D0 on shield) goes to Xbee TX
2. Digital Pin 5 connected through resistor 1 (we used 220 ohms) to positive end of the LED. GND to the negative end.
3. Digital Pin 6 connected through resistor 2 to positive end of LED. GND to to negative end.
Now, since you already uploaded the sketches to each Arduino, turn power on for both. Turn your potentiometers on and off and if you have everything correct, you will see the LED’s turn on an off. The range on these particular Xbee’s were really good. We tested the sender being in our basement lab and the reciever was traveling around the block in our neighborhood. Amazing!
Arduino Sketch Files:
Other References:







