PIR sensor Multi input sketch

299 views
Skip to first unread message

Elizabeth Bennett

unread,
May 23, 2013, 5:41:09 AM5/23/13
to vpt-...@googlegroups.com
Hi,

I'm trying to use a PIR sensor to control videos playing for my projection. I need the screen to go black whenever there isn't a signal. Could I use the VPT Multi input sketch for this? Would I need to alter it at all to match the sensor type?

Thank you!


hc

unread,
May 23, 2013, 9:59:32 AM5/23/13
to vpt-...@googlegroups.com
You probably need to adapt the multiinput sketch by looking at the example in the arduino playground for example.
http://playground.arduino.cc/Code/PIRsense
The important thing is to send a two-part message to VPT. First the controller nr, then the value (which for the PIR sensor would be a digital input).

Elizabeth Bennett

unread,
May 24, 2013, 1:54:26 AM5/24/13
to vpt-...@googlegroups.com
Thanks! I'll have a look at that,

I'm trying to get the data from arduino to trigger different presets in VPT, do I have to use the cuelist for that? I can't find out what to write in the cuelist for it to use the data from the arduino?

hc

unread,
May 25, 2013, 7:57:04 AM5/25/13
to vpt-...@googlegroups.com
The data you send from the arduino is formatted the same way as with using a midi controller or the built in lfo: you use the router to map the incoming control data to the vpt parameter you want to control. First number is the control nr, second the value.

Elizabeth Bennett

unread,
May 28, 2013, 12:36:22 AM5/28/13
to vpt-...@googlegroups.com

Hi, thank you for your reply. I've set up the serial and router to fade layer one when it receives signal from the serial com, I wanted it to fade to reveal the layer beneath it whenever there was motion. I used the multi input sketch and altered it a little, now theres two digits appearing together continuously in the serial com window and the second digit changes as motion occurs, which looks right. I have selected 'listen' but can't see anything happening to my layer, do you know why this could be? I'm unsure of whether it's my code, or if it's something to do with the way I've set up inside VPT?

hc

unread,
May 28, 2013, 5:02:04 AM5/28/13
to vpt-...@googlegroups.com
have you checked out the serialmodule helpfile (click on the ?)?
I think you might need to choose ctrl nr in the serial module as well (bottom right corner). You should anyway be seeing incoming data in one of the red serial modules if the arduino is set up corretly.
Reply all
Reply to author
Forward
0 new messages