Readings the PIR sensor from GPIO is as simple as reading 1 or 0 from a port... this tutorial may help you for using the PIR:
https://peppe8o.com/raspberry-pi-pir-hc ... detection/
Here a motion and a no_motion functions are defined. You can change the functions content (print statements) with whatever action you need.
For example, you could send a Smartphone notification on motion detection by using Alertzy. Here's the related tutorial:
https://peppe8o.com/smartphone-notifica ... i-alertzy/.
I hope this can help you with your project
https://peppe8o.com/raspberry-pi-pir-hc ... detection/
Here a motion and a no_motion functions are defined. You can change the functions content (print statements) with whatever action you need.
For example, you could send a Smartphone notification on motion detection by using Alertzy. Here's the related tutorial:
https://peppe8o.com/smartphone-notifica ... i-alertzy/.
I hope this can help you with your project
Statistics: Posted by peppe8o — Sun Dec 29, 2024 6:39 pm