O'Reilly logo

Raspberry Pi, 2nd Edition by Maik Schmidt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required