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

Adding setpoint control

As a first step to turn your coordinator into a thermostat, you will need some way to control the setpoints. In this example, a single setpoint for the entire house is used, but it should be easy to add one per room and adapt the code to check each room temperature against the appropriate setpoint.

To store the setpoint, create a new channel in Beebotte called House. Inside, add a Setpoint resource, using the temperature type from the dropdown.

For this resource, you should enable the Send on Subscribe (SoS) option. Normally, when you subscribe to a resource, you will only receive new values published to it. For the setpoint, this will mean that the coordinator will get notified whenever the setpoint is changed. However, when the coordinator Arduino is first turned on or resets, it will not know about the current setpoint until it changes. The SoS option solves this by automatically sending the current value of the setpoint whenever the coordinator subscribes to it...

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