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)

Creating a window sensor


This example will use a standalone XBee module to read the status of a reed switch in order to detect whether a window is open or closed. In this section, some options for the hardware setup are given. The setup using the recommended hardware items looks as follows:

In addition to setting up the hardware, some configuration is needed to let the standalone module send out the pin state whenever it changes and some modifications must be made to the coordinator sketch to process these messages, all of which will be described next.

Connecting things

To let the XBee module work standalone, you will have to connect a few things to it. As the XBee module pins are fairly short, you cannot just connect the female jumper wires to them, and because XBee uses 2.0 mm spacing, it cannot be directly connected to a breadboard, stripboard, or similar boards (as these use 2.54 mm spacing). You could directly solder some wires to the pins but it is easier to use a breakout board.

A breakout...