Using Arduino and PIR sensors to trigger different videos on computer

Hello all,

I am new to using Arduino and electronics, and am currently working on an art installation that requires PIR motion sensors and Arduino.
What I need is a series of PIR sensors (maybe 8/10) which when a person approaches each sensor, a video will play on a computer. Each sensor will have a different corresponding video, that switches when a person moves to another sensor. The videos will be then projected by the computer on a wall.

I am using these PIR sensors: https://www.amazon.co.uk/gp/product/B088LR9KRP/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1

Do you have any advice on which Arduino to use, and if this can be possibly achieved? I read that this can be achieved by using Arduino Uno.

Thanks in advance, any help will be greatly appreciated!

Hi there!
If I would have to do the same project, I would have the Arduino send messages to the computer using serial and then the computer would execute the video file. Let's say for example you have two video files: a) video1 and b) video2. My approach would be the following:
Arduino UNO:

Serial.println("video1"); //Sends the string "video1" to the computer using serial
Serial.println("video2"); //The same, just "video2"

PC (assuming Windows, but using different environments it is possible on MacOS and Linux):
On Windows, you can write a simple Processing application or C#. I prefer C# because it is simpler for me and has more in common with what you use to program an Arduino. You just need to install Visual Studio 2019 Community. Then, google for "how to interface Arduino with C#".

This video will get you started.

Then, find out how to make C# play a video file. That's it.

You can also, with an ATmega32U4 based Arduino such as a Pro Micro or Leonardo, emulate a PC keyboard.
That means, if you can work out a keyboard key sequence to initiate a Video, you can trigger it from the Arduino. Reading a PIR sensor is a trivial activity on an Arduino.

6v6gt:
You can also, with an ATmega32U4 based Arduino such as a Pro Micro or Leonardo, emulate a PC keyboard.
That means, if you can work out a keyboard key sequence to initiate a Video, you can trigger it from the Arduino. Reading a PIR sensor is a trivial activity on an Arduino.

I agree with you! It was just that the OP said he has an UNO so I found a solution based on his current hardware.

Since this involves software on the PC itself, you might consider the old USB-parallel adapter cables. Or you may even have an actual parallel port!

.
You have at least eight data pins on these which are generally bidirectional and can be used as inputs, so if you can find the right driver software, you can interface the sensors directly to the PC without an Arduino and read them with a script.

Not dead easy, but this project is not that simple either! (Generally much easier with Linux. :grinning: )

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.