Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4829

Beginners • Re: How to process from sensor and send notification peridically?

$
0
0
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.
But PIR signal will stay up only for some duration. It can become zero even before I check it in the loop.
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.

Statistics: Posted by ame — Fri Dec 27, 2024 8:46 pm



Viewing all articles
Browse latest Browse all 4829

Trending Articles