Hardware Reference
In-Depth Information
Enabling an XBee interface in the Arduino
IDE
Let's first set up the Arduino IDE for XBee that will be connected to your Arduino. Once
you have connected all the shields to your Arduino, simply connect your Arduino with the
USB cable to one of the computers. Bring up the Arduino IDE and then type in the follow-
ing code into the sketch window:
This sketch is quite simple; you can turn on the on-board LED with remote commands, 1
to turn it on and 0 to turn it off. Once you have compiled and uploaded this code, discon-
nect the USB cable from the computer. You'll need to physically change a switch setting on
the wireless shield so that the device will now accept commands from your XBee control-
ler. It is on the opposite end of the shield and looks like the following image:
Search WWH ::




Custom Search