Building the Solution

This is one of the easier projects in the book, since it relies entirely on the Arduino, an add-on shield, a sensor, and a servo motor. When constructed, the completed assembly should look similar to the one shown in Figure 7, An Electronic Guard Dog. Here’s how we will build it:

  1. Attach an Adafruit wave shield to the Arduino.

  2. Connect a PIR to the wave shield’s power, ground, and one of the available digital pins.

  3. Connect a servo to the wave shield’s power, ground, and another one of the available digital pins.

  4. Download additional Arduino libraries that allow the wave shield to be easily controlled while preventing resource conflicts with sending instructions simultaneously to the servo.

  5. Write a sketch that randomly ...

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.