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 standalone relay

In addition to reading the input pins remotely, you can also control them remotely. All the XBee modules support a digital output (low/high) and some also support PWM output (pulse width modulation, as used by analogWrite in Arduino).

This section shows how to use a digital output pin to control a relay, letting you make a simpler version of the remote relay that you saw in Chapter 4, Controlling the World. Obviously, the wiring will be different as there is no Arduino involved anymore. The coordinator sketch will also need some modifications as the XBee module needs a different kind of a message to change its output pin.

When using the recommended hardware items, this example should look as follows:

Creating a standalone relay

Connecting things

Most of the wiring is the same as with the window sensor. You will need some kind of a breakout board and power supply. The relay module can be wired up by connecting GND and VCC/5V to the power supply and the relay control pin to the DIO1 pin on XBee...

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 R$50/month. Cancel anytime