This example shows how to use Parallax Passive Infrared Motion Sensor. The driver works with any pin. It tries to use interrupts if available and falls back to regular input port and monitoring thread if interrupt is not supported by the pin.
Why falling edge?
Correct me if I am wrong.
It is high when there is a motion. So you need the event as soon as possible.
As I mentioned in the description this driver will try to use Interrupt Port (preferable),but if the provided pin doesn’t support interrupts it will fall back to the Input Port and monitoring thread.
I like this little sensor. Good for “waking up” robots.