That's unlikely. The PIR can be configured to assert its output for several seconds. Its shortest pulse will be longer than any program loop on the Pi.But PIR signal will stay up only for some duration. It can become zero even before I check it in the loop.See the excellent startup guide here https://forums.raspberrypi.com/viewtopic.php?t=314455
B) get your python script to check things in a loop (while…) every 5 minutes (say) if no PIR has been seen, send email.
Store the PIR reading (from GPIO) with a timestamp in a file or SQLite database.
No threads needed.
No locking needed.
No synchronisation needed.
Statistics: Posted by ame — Fri Dec 27, 2024 8:46 pm