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

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

$
0
0
When PIR senses movement, it will send an input.
How is the PIR sensor sending the data?
Am connecting the PIR to one of the GPIO pins. When it senses the motion, it calls a function or my code is waiting on it for a signal.
No offense, but it does not sound like you've thought this through. This may provide some direction https://projects.raspberrypi.org/en/pro ... mputing/11
b) When PIR senses movement, it will send an input. This needs to stored internally in some data structure say an array.
Periodically I need to check and if there are no inputs from the sensor, then I need to send phone call notification.
How do I do this in the python program?
This is easily done by setting a timestamp when motion is detected. Then, in the loop, calculating how long it has be since the last movement. If it's been too long, take action

Statistics: Posted by DS256 — Fri Dec 27, 2024 10:03 pm



Viewing all articles
Browse latest Browse all 5051

Trending Articles