O'Reilly logo

Raspberry Pi Android Projects by Gökhan Kurt

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

The surveillance mode

It is cool to see the streaming from your camera, but it is much more useful to be able to run it in surveillance mode. We want the camera to react to motion and save images or videos whenever motion is detected, so that we can check them later instead of keeping an eye on the video. For this purpose, we will begin installing a motion recognition software on our Pi, which is called for apparent reasons, motion:

sudo apt-get install motion

This will install the motion software and the following command will add the necessary packages to the kernel:

sudo modprobe bcm2835-v4l2

It is a good idea to put this in the /etc/rc.local file so that it can be run at startup. You should put it before the exit 0 line, though.

We will even ...

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