Raspberry Pi Home Automation with Arduino - Second Edition
eBook - ePub

Raspberry Pi Home Automation with Arduino - Second Edition

Andrew K. Dennis

Share book
  1. 148 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Raspberry Pi Home Automation with Arduino - Second Edition

Andrew K. Dennis

Book details
Book preview
Table of contents
Citations

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Raspberry Pi Home Automation with Arduino - Second Edition an online PDF/ePUB?
Yes, you can access Raspberry Pi Home Automation with Arduino - Second Edition by Andrew K. Dennis in PDF and/or ePUB format, as well as other popular books in Computer Science & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781784399207

Raspberry Pi Home Automation with Arduino Second Edition


Table of Contents

Raspberry Pi Home Automation with Arduino Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. An Introduction to the Raspberry Pi, Arduino, and Home Automation
History and background of the Raspberry Pi
History and background of the Arduino
Raspberry Pi to Arduino shield connection bridge
Soldering
Creating software for the Arduino
What is home automation?
History of home automation
X10 – a standard is born
The dot-com boom and open source – a new set of technologies
Commercial products
Arrival of the Raspberry Pi
Summary
2. Getting Started – Setting Up Your Raspberry Pi and Arduino
The SD card – our Raspberry Pi's storage device
Preinstalled SD card versus a blank SD card
A note on Noobs
Downloading Raspbian
Setting up the SD card and installing Raspbian
Raspberry Pi SSH setup
Arduino
Installing the IDE on your Raspberry Pi
A quick guide to the Arduino IDE
Using the Arduino to Raspberry Pi connection bridge
Summary
3. Central Air and Heating Thermostat
Safety first
Introducing the thermostat
Setting up our hardware
Adding the Ethernet shield
Relays
Connecting the thermistor
Setting up our software
Thermostat software
Testing our thermostat and fan
Attaching the fan
Starting your thermostat application
Testing the JSON response
Next steps
Attaching the device to your heating system or a similar appliance
Adding a potentiometer
Adding an LCD screen
Summary
4. Temperature Storage – Setting Up a Database to Store Your Results
SSH
SQLite
Installing SQLite Version 3.x
Creating a database
A table to record our temperature
A table to record our rooms
Writing SQL queries
Creating a Python application to write to our database
Checking the results
Adding a cron job
HTSQL
Downloading HTSQL
Configuring HTSQL
Summary
5. Parcel Delivery Detector
Wiring up the parcel sensor
An introduction to resistors
Pressure sensor – force-sensing resistor
10K ohm resistor
Connecting the components to the Arduino
Writing our software
Updating the Raspberry Pi database
A web-based Python application
Setting up SMTP
Our Python application
Starting the web service
Testing our application
Installing the parcel detector
Testing the complete setup
Next steps
Upgrading from Ethernet to a wireless system
Checking the shipping details
Replacing the pressure sensor with a camera and image recognition
Summary
6. Curtain Automation – Open and Close the Curtains Based on the Ambient Light
Introduction to the Arduino bridge shield
Installing arduPi
Photoresistors
Motor shield and motors
Setting up the photoresistor
Wiring up the components
Testing the photoresistor with software
Makefiles
Setting up the motor shield
Wiring the components to the shield
Curtain control application
Pulse width modulation
Threads
Writing our code
Connecting to your blinds/curtains
Setting the timing
Attaching the hardware
Debugging problems
Next steps
Mounting the photoresistor outdoors
Adding a stepper motor
Summary
7. Water/Damp Detection – Check for Damp/Flooding in Sheds and Basements
A brief note on dampness
Damp detection system
Arduino circuit
Sketch code
Database updates
Python code
Adding a cron job
Using the humidity reading
Adding an LED alert
Blinking LED code
Expanding the LED functionality
Connecting a dehumidifier
Water detection
Summary
8. Wrapping Up
A brief review of the second edition of Raspberry Pi Home Automation with Arduino
Next steps
The prototyping Pi Plate
The wiringPi library
The Gertboard
Introduction to the Gertboard components
GPIO PCB expansion board
GPIO pins
Motor controller
The open collector drivers
Buffered I/O
Atmel ATmega microcontroller
Convertors – analog to digital and digital to analog
Creating software for the Gertboard
Ideas for future projects
Expanding the curtain automation tool to include temperature sensing
Changing the motor on the curtain automation project to a stepper motor
Switching lights on with a photoresistor
Holiday lights from LEDs
The future of home automation
3D printing
RFID chips
EEG headsets
Summary
A. References
Raspberry Pi
Raspberry Pi to Arduino bridge shield
Linux
Python
C/C++
Arduino
SQL
HTSQL
Electronics
Packt Publishing titles
Home automation technology
3D printing
Index

Raspberry Pi Home Automation with Arduino Second Edition

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2013
Second edition: February 2015
Production reference: 1200215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-920-7
www.packtpub.com

Credits

Author
Andrew K. Dennis
Reviewers
Ed Baker
RĂ©my BĂ©tus
Piotr Kula
Commissioning Editor
Akram Hussain
Acquisition Editor
Richard Brookes-Bland
Con...

Table of contents