Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building Wireless Sensor Networks Using Arduino

You're reading from  Building Wireless Sensor Networks Using Arduino

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781784395582
Pages 192 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Matthijs Kooijman Matthijs Kooijman
Profile icon Matthijs Kooijman

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 $15.99/month. Cancel anytime}