Build a Burglar Alarm
In Detect Motion with the Pi, you learned how to control a motion sensor with the Pi. The controlling software only printed messages to the console—which is fine for demonstration purposes, but in real life it’s not very useful. In this section, you’ll learn how to build an actual burglar alarm that takes photos automatically as soon as someone moves, and then sends an email with the latest photo attached.
Disable the Camera’s LED
A burglar alarm should work as unobtrusively as possible, and one feature of the Pi camera contradicts this principle. Whenever the camera takes a photo or records a video, it turns on a bright-red LED. Usually this is good because it shows that the camera is working and it prevents you from ...
Get Raspberry Pi, 2nd Edition 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.