VVVV+Arduino Magnetic Door Sensor Work

Hi guys, i need an help. I want to do a school project that uses vvvv, arduino and an ultrasonic sensor. My project is to detect a person opening a door and making a video(vlc) appear on the renderer. Basically, everytime the doors open a video projection in the room that the door conduct to start playing, in total there will be 5 videos that play. Now my problem is patching the arduino board and making a patch that makes the video start whenever the sensor detect motion in the short distance between the door and the handle. I hope you can help me out, i’m pretty bad in this, but i kinda need it, so, thanks in advance.

https://www.instructables.com/id/Magnetic-Door-Sensor-and-Arduino/ you could always use a magnetic sensor, should be a bit more switch like than a distance sensor?

1 Like

well, that seems the best way to do it, thanks. But then how i’m gonna put it all together? That’s my main problem.
1- DO i have to load firmata standard into arduino or the code that’s written in the link?
2- Since i’m bad, how can i manage to receive data from the sensor and make it play my video and next playing another when i reopen the door?

(I just need to get one single handle since ipothetically i would use 2 arduino’s, so i just need to make one handle play 3 videos in order)

thanks for the help, hope you can help me with this :)

PS: and if a used a tilt switch? since it is a tilting handle could it be possible?

You should be able to use firmata, and vvvv will recieve it as an on off message that you can use straight off. All that code does is make inputpin 2 an input, and then if it is low, turn the LED (pin13) on. So in firmata make a digital input pin, and then read the values from it. Easy :)
Post back if you have trouble.
If you want to use a tilt switch, that should work the saem way I think, just set up and input pin and get the values from firmata.

1 Like

OK, thanks a lot, i have other problems i’ll ask, :)

Ok, i can’t do anything hahah, i tried but nothing works as it need to, if you could help me out with the patch it would be great.

Hey Basasa,
Its not a complicated process!
do things one by one:

  • Make sure you have StandardFirmata uploaded on your arduino
  • Check the help patch for Firmata Board node
  • Look how Digital Read node behaves with and without Pull Up pin (Using Magnet)
  • For playing the video one after the other, simply use a Counter node again: open the help patch look how it behaves in different scenarios.
    If its still not working as it should, then upload your patch here.
1 Like

Thanks a lot, i’ll try this things out and reach out for you if i need other help, thanks again guys!

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