May 18, 2024, 06:19:42 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


Using vmusic2 and prop1 only with a low input trigger

Started by reddragon, April 07, 2009, 07:44:15 PM

Previous topic - Next topic

reddragon

 Hi Jon, I was looking in the forms and seen diffent ways to wright codes for the vmusic2 useing differnt add on like fc-4s and pir. There is one that you have wrote and it uses a high input for a trigger. For mine i will be using a mat switch in and scince its not a high input i was needing a starting step if you have the time with a low input trigger i would like do have a sampel to look over and study. Thanks Jon

JonnyMac

The mat switches I've seen are just normally-open push-buttons.  If you connect one lead to Px.W (usually P6.W) and the other lead to Px.R you get an active-high input.  If using P6 then move the SETUP jumper to the DN position.  You can use P0 to P5 as well because the ULN has a pull-down on its input.

The I use the same trigger loop for any active-high input, PIR or N.O. button:

Main:
  timer = 0                                     ' reset timer

Check_Trigger:
  PAUSE 5                                       ' loop pad
  timer = timer + 5 * Trigger                   ' update timer
  IF timer < 100 THEN Check_Trigger             ' wait for 0.1 sec input
Jon McPhalen
EFX-TEK Hollywood Office