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

Detect Motion with the Pi

Chances are good that you benefit from motion detectors several times a week or even several times a day. They might turn on the lights automatically at dark, or perhaps they turn on the lights when you enter the restroom at work. In this section, you’ll learn how these detectors work, and you’ll learn how to turn the Pi into a motion detector.

Connect the PIR Sensor to the Pi

Many motion detectors use passive infrared (PIR) sensors.[116] A PIR sensor permanently measures infrared light and notices whenever something in the infrared spectrum changes. This is all you need to detect motion, because nearly every object emits infrared light. That’s true for everything in front of your house: the ground, a bicycle, a garbage ...

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