Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Wireless Sensor Networks Using Arduino

You're reading from   Building Wireless Sensor Networks Using Arduino Leverage the powerful Arduino and XBee platforms to monitor and control your surroundings

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781784395582
Length 192 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Matthijs Kooijman Matthijs Kooijman
Author Profile Icon Matthijs Kooijman
Matthijs Kooijman
Arrow right icon
View More author details
Toc

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:

Creating a window sensor

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime