Josh writes – “Motion detectors typically have 4 wire connections. 2 for DC power and 2 for telling you if the circuit is open or closed.
Most motion detectors will be a normally open circuit. But check it out with a multimeter.
Now you can plug in your mouse to your computer and when someone triggers your motion detector you get a mouse click. What can you do with that you might ask? Well I’m using it for a multimedia installation where I trigger some sounds and projections when people get close enough.
After I made this I found some other stuff on the web that shows a similar idea but using a keyboard connector. If you need lots of inputs thats the way to go.” – Link.