Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bylotonix/pir-sensor

Motion Detector based on Raspberry Pi
https://github.com/bylotonix/pir-sensor

motion-detector pi-camera pir-sensor python raspberry-pi

Last synced: about 2 months ago
JSON representation

Motion Detector based on Raspberry Pi

Awesome Lists containing this project

README

        

Raspberry Pi Motion Detector


Raspberry Pi Motion Detector is a Python script with which you can use Raspberry Pi and a PIR sensor as a motion detector.

## Warnings:
- Only **Raspberry Pi OS Bullseye** is supported.

## Requirements:
- Raspberry Pi
- Any three-pin PIR sensor

## Setup:
- In the file pir.py edit poweroff_delay and check_delay to change the screen auto-off time and the delay between sensor polling, as well as pir_pin to the one you use for the sensor (BOARD type numbering)
```sh
gpio.setmode(gpio.BOARD)
poweroff_delay = 10
check_delay = 0.85
pir_pin = 11
```
- Download the script:
```sh
git clone https://github.com/ByloTonix/PIR-Sensor/
cd PIR-Sensor/
```

## Usage:
- After completing the configuration, go to the directory with the script and run it:
```sh
cd ~/PIR-Sensor
sudo python3 pir.py
```