CHAPTER 5 ■ IOT PATTERNS: REALTIME CLIENTS
Software Required
In order to develop the intrusion detection system, you need the following software :
- Arduino IDE 1.6.4 or later version
- Android Studio 1.5.1 or later
Circuit
In this section, you are going to build the circuit required for the intrusion detection
system. This circuit uses an HC-SR501 motion sensor to detect intrusions.
Make sure your Arduino is not connected to a power source,
such as to a computer via a USB or a battery.
Attach a WiFi shield to the top of Arduino. All the pins
should align.
Use jumper cables to connect the power (5V) and ground
(GND) ports on Arduino to the power (+) and ground (-) ports
on the breadboard.
Now that your breadboard has a power source, use jumper
cables to connect the power (+) and ground (-) ports of your
breadboard to the power and ground ports of the motion sensor.
To read motion sensor values, you need to connect a jumper
cable from signal port of the motion sensor (usually the
middle port) to digital port 3 of your Arduino. You can use
other digital ports as well, but if you do, make sure to change
the Arduino code appropriately.
Your circuit is now complete and it should look similar to Figures 5-3 and 5-4.