Reader small image

You're reading from  Raspberry Pi Essentials

Product typeBook
Published inApr 2015
Publisher
ISBN-139781784396398
Edition1st Edition
Right arrow
Author (1)
Jack Creasey
Jack Creasey
author image
Jack Creasey

Jack Creasey has been in the technology industry for more than 30 years, the last 15 years as a Senior Program Manager in hardware and software design. His expertise includes designing, developing, and teaching IT courseware. He is an avid inventor and holds 13 patents in hardware and software design. After retiring early from the computing industry, Jack avidly participates in social network groups that share his passion for next generation technology solutions.
Read more about Jack Creasey

Right arrow

Project 2 – Combining the webcam movement detector and the PiCam camera


Now that we have a working PiCam script and know which configuration details are needed to enable motion movement detection, we can update the Bash script from Project 1a – Creating a Bash script to drive raspivid to include this motion detector feature. So, we need to enable actions in the motion configuration file to start and pause recording using a script.

Here is a preview of what is added to the new security.sh script:

  • For the load option, the command lines to start motion are added and the USB camera is set to a fixed focus

  • For the quit option, a command line is added to kill motion

  • For the motion configuration file, the following events are enabled:

    • A motion-detect event that turns on PiCam recording

    • An end-of-movement event that pauses PiCam recording

Since the script file is now over 100 lines long, it would be quite a chore to type in the changes. To get the new file with the changes added as described in the previous...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi Essentials
Published in: Apr 2015Publisher: ISBN-13: 9781784396398

Author (1)

author image
Jack Creasey

Jack Creasey has been in the technology industry for more than 30 years, the last 15 years as a Senior Program Manager in hardware and software design. His expertise includes designing, developing, and teaching IT courseware. He is an avid inventor and holds 13 patents in hardware and software design. After retiring early from the computing industry, Jack avidly participates in social network groups that share his passion for next generation technology solutions.
Read more about Jack Creasey