Book Image

Building Wireless Sensor Networks Using Arduino

By : Matthijs Kooijman
Book Image

Building Wireless Sensor Networks Using Arduino

By: Matthijs Kooijman

Overview of this book

Table of Contents (13 chapters)

Your first transmission


In this section, you will send your first messages between two XBee modules. The first module will be attached to your computer through the XBee Explorer USB board, using the XCTU program to talk to it. To remove the need for a second Explorer board just for this example, the second module will be connected to an Arduino, which will simply print all data received through the serial monitor.

To let your XBee modules start a network, you will need to have exactly one coordinator module, and one or more router modules (the difference between these will be discussed later). XBee modules will usually default to being a router, so you will need to switch one into coordinator mode, as shown next.

This chapter will show brief instructions on connecting things with the recommended hardware. It is possible to use different hardware too, but it is recommended you read on until the first part of the next chapter, since that contains more details on how the connection actually works and what you should be aware of when figuring out how to connect your hardware.

Using the SparkFun XBee Explorer USB

This is by far the easiest way to connect an XBee module: just plug in the XBee module and connect the USB cable:

Be sure to disconnect the power (USB cable) when changing connections, or (un)plugging XBee modules into adapters and shields, to avoid damaging them.

You might have to install drivers for the FTDI USB-to-serial chip used by the Explorer, though this should have been taken care of if you have already installed the Arduino IDE (the older Arduino boards use the same chip and drivers). See the SparkFun site for more information on using the Explorer boards (https://learn.sparkfun.com/tutorials/exploring-xbees-and-xctu) or installing the FTDI drivers (https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers).

If the drivers are installed correctly, a new (virtual) serial port will be made available; you can select it in the XCTU program later.