0% found this document useful (0 votes)
7 views2 pages

PIR Sensor Motion Detection with Raspberry Pi

Uploaded by

ruchitshivani456
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

PIR Sensor Motion Detection with Raspberry Pi

Uploaded by

ruchitshivani456
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

LAB –10 Programming on PIR sensor

Aim:
To detect the movement using Passive Infrared (PIR) sensor using Raspberry pi board
using Python.

Task:
Construct a “Motion Detector” using PIR sensor and Raspberry pi board using Python.

Pin & Circuit Diagram:

Algorithm:

1. Set up the hardware by connecting the PIR sensor to the Raspberry Pi.
2. Import the required libraries like [Link] and time.
3. Configure GPIO pins, setting the mode to BCM and defining the PIR sensor input.
4. Continuously monitor the PIR sensor for any motion detection.
5. If motion is detected, print a message and trigger an action like lighting an LED.
6. Clean up the GPIO pins once the program is stopped to avoid errors.
Program:

Output:
Pre Lab-Questions:
1. Define motion sensor.
2. Illustrate the characteristics of Adafruit PIR sensor.

Post Lab Questions:


1. What is retriggering?
2. How do PIR sensors work?

Result: All Algorithms and Programs have been compiled and executed and have
successfully returned the desired output.

You might also like