You are previewing Raspberry Pi Home Automation with Arduino.

Raspberry Pi Home Automation with Arduino

Cover of Raspberry Pi Home Automation with Arduino by Andrew K. Dennis Published by Packt Publishing
  1. Raspberry Pi Home Automation with Arduino
    1. Table of Contents
    2. Raspberry Pi Home Automation with Arduino
    3. Credits
    4. About the Author
    5. Acknowledgement
    6. About the Reviewer
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
      2. Why Subscribe?
      3. Free Access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
    9. 1. An Introduction to the Raspberry Pi, Arduino, and Home Automation
      1. What we will explore in this book
      2. History and background of the Raspberry Pi
      3. History and background of Arduino
      4. What home automation is
      5. Summary
    10. 2. Getting Started Part 1 – Setting up Your Raspberry Pi
      1. The SD card – our Raspberry Pi's storage device
      2. Pre-installed SD card versus a blank one
      3. Setting up the SD card
      4. BerryBoot – our tool for installing an operating system
      5. Summary
    11. 3. Getting Started Part 2 – Setting up Your Raspberry Pi to Arduino Bridge Shield
      1. Raspberry Pi to Arduino bridge shield
      2. Summary
    12. 4. Our First Project – A Basic Thermometer
      1. Building a thermometer
      2. Software for our thermometer
      3. Summary
    13. 5. From Thermometer to Thermostat – Building upon Our First Project
      1. Safety first
      2. Introducing the thermostat
      3. Setting up our hardware
      4. Setting up our software
      5. Testing our thermostat and fan
      6. Summary
    14. 6. Temperature Storage – Setting up a Database to Store Your Results
      1. SQLite
      2. Apache web server
      3. HTSQL
      4. Testing our Arduino shield with our database
      5. Summary
    15. 7. Curtain Automation – Open and Close the Curtains Based on the Ambient Light
      1. Photoresistors
      2. Motor shield and motors
      3. Setting up the photoresistor
      4. Curtain control application
      5. Summary
    16. 8. Wrapping up
      1. A brief review of what we have learned
      2. Next steps
      3. Ideas for next step projects
      4. The future of home automation
      5. Summary
    17. A. References
      1. Raspberry Pi
      2. Raspberry Pi to Arduino bridge shield
      3. Linux
      4. Python
      5. C/C++
      6. Arduino
      7. SQL
      8. HTSQL
      9. Apache
      10. Electronics
      11. Packt Publishing titles
      12. Home automation technology
      13. 3D printing
      14. EEG headsets
      15. Miscellaneous resources
    18. Index
O'Reilly logo

Setting up the photoresistor

We are going to start by wiring up our photoresistor and testing it with some software. Once we have tested it, we can then hook it up to the motor shield and use the values it returns to turn the motor on and off.

Wiring up the components

Our first task is to set up our circuit. This process is very similar to when you created the thermistor circuit in Chapter 3, Our First Project–A Basic Thermometer.

You'll need your resistor, photoresistor, three wires (black, red, and yellow are used in the explanation), and the breadboard.

  1. Take the red wire and connect it from the 5 V pin on the shield to the supply voltage on the breadboard.
  2. Next take the black wire and connect it from the ground pin on the Raspberry Pi to the Arduino ...

The best content for your career. Discover unlimited learning on demand for around $1/day.