
BeagleBone By Example
By :

In this section, we will build a home surveillance security alert system, where we will have a BeagleBone board to which a PIR sensor is connected. A USB camera is connected to it, and the BeagleBone board is connected to the Internet. So basically, the system will capture an image from the camera whenever some movement is detected in front of the PIR sensor.
Follow these steps:
Set up the PIR sensor with the BeagleBone board, just like we did in the motion-detection topic of this chapter, connect the USB web camera to the BeagleBone board and, log in into the system. The setup looks as shown in the following picture:
Create a new directory for this project with sudo mkdir HomeSecurity
:
Use cd HomeSecurity
:
Create the Python script for the project using sudo nano EmailAlert.py
:
Type the following code into the file. The code contains comments on most of the lines to give you a clear explanation of how it works.
Once you have typed the...