PIR sensors to play video file through a projector


I've been learning how to use the Arduino in order to set up an installation that uses PIR sensors to activate a film-clip on the laptop through a projector. I just need the projector to start playing whenever they are set off, and to stop when the Arduino does not read a signal.

I know how to connect the sensors and tell the Arduino how to read the value, and can get my head around sending this information to the computer using serial communication, but then I'm a bit stuck on how to go about using that information to play the film? These are a few things i've been looking into:


I was thinking I could loop the film, and use processing to black out the image whenever the PIR sensor wasn't activated? - As I would have to keep the projector powered the whole time and wouldn't want the screen projecting when the film wasn't playing. I've looked into downloading the video library on this but can't seem to get my film to play, its a mov. file. -- Could this be down to file size?

There's so much information out there i'm getting confused about what to look at or try first. I suppose, if what i've described is the correct way to go about this, i need to understand:

--How to read the information sent through serial communication in processing? (Have been programming with Arduino software up until this point) --How to get my film clip to respond to this by showing/ hiding the projection... possibly covering it with a black layer

If anyone has any (as simple as possible) ideas about how I could go about this, or can help with any part of this, I will be very very grateful, and happy! :)

I have an Arduino Uno (R3), PIR sensor, some other bits and bobs (wires, resistors etc..), and use a mac.

Thank you!


You need an application on the PC to receive the serial messages from your Arduino and start/stop the playback. You don't say what OS is running on the laptop, but if it's Windows you could use Gobetwino to start/stop a process on the PC based on commands sent from the Arduino. (If it's not Windows you'd have to program your own equivalent, but it shouldn't be hard.) I'd plan to use a media player application which could be started in fullscreen mode with a specified media file. In Windows, that's usually done by configuring your preferred media player so that it was associated with the file extensions of the media files you wanted it to play, and then launch the media file as though it was an executable; the Windows shell will automatically launch the application associated with the default action for that file type.

Hello, I have a similar project like the one you have. I would like to ask your help regarding the playing of a file. My project goes like this: a PIR sensor is connected to an Arduino UNO board when the PIR detects motion, a video will play while a video is playing, the PIR continously captures images for motion the media player will playback a series of videos until the PIR sensor does not detect motion anymore

can you help us on the commands on how to control video file through arduino?? if you wouldn't mind, can we use your source code as our reference for this project??

I am trying to do exactly what your doing, PIR sensor connected to arduino and when someone walks past a video will be activated, the problem is i have cam up with this concept but have no idea who to go about making this, did you follow a tutorial or anything like that, would be very grateful


I'd like to know if any of you had any progress with this.

Seeing as I've also forked out and bought an Arduino and want to do the same :)