Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Raspberry Pi Essentials

You're reading from  Raspberry Pi Essentials

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781784396398
Pages 212 pages
Edition 1st Edition
Languages
Author (1):
Jack Creasey Jack Creasey
Profile icon Jack Creasey

Table of Contents (15) Chapters

Raspberry Pi Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Raspberry Pi 2. Configuring the Raspberry Pi Desktop and Software 3. Raspberry Pi and Cameras 4. Raspberry Pi Audio Input and Output 5. Port Input and Output on the Raspberry Pi 6. Driving I2C Peripherals on the Raspberry Pi 7. Going Mobile with Raspberry Pi 8. Creating a Raspberry Pi Line-following Robot Index

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}