Book Image

Raspberry Pi Home Automation with Arduino - Second Edition

By : Andrew K. Dennis
Book Image

Raspberry Pi Home Automation with Arduino - Second Edition

By: Andrew K. Dennis

Overview of this book

Table of Contents (16 chapters)
Raspberry Pi Home Automation with Arduino Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Temperature Storage – Setting Up a Database to Store Your Results
Index

Wiring up the components


Our first task is to set up our circuit. This process is very similar to the way you created the FSR circuit in Chapter 5, Parcel Delivery Detector.

You'll need your resistor, photoresistor, three wires (black, red, and yellow are used in the explanation), and the breadboard. Follow these steps to wire up the components:

  • Take the red wire and connect it from the 5V pin on the shield to the supply voltage on the breadboard.

  • Next, connect the black wire from the ground pin on the Raspberry Pi to Arduino bridge shield to the ground on the breadboard.

  • As we did with the FSR circuit before, we will now connect a resistor to the breadboard. Connect one pin of your resistor to the supply voltage strip that your red wire is connected to, and then connect the other end to a terminal strip.

  • We can now connect our photoresistor. Insert one leg of the photoresistor into the ground on the bus strip, and place the second leg into the same row as you placed the resistor.

  • Finally, connect...