November 23, 2024, 10:52:08 PM

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.


Prop 1 trigger CAR-P 300 Sound Board

Started by cs1245, October 29, 2011, 08:20:11 PM

Previous topic - Next topic

cs1245

I am looking to use the Prop-1 to trigger a CAR-P 300.  I have an approximate 15 sec long sound sequence.  I am looking to use a Velleman IR Break Beam kit to trigger the Prop-1.  I will need a predelay of 2 secs and a post-delay of 5 secs.  Can someone write a program for it?  Thanks.


bsnut

Here's your program based on your last post. Which, I set your post-delay in the Reset section of the program and pre-delay just after the trigger code.

'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------
'I have an approximate 15 sec long sound sequence. 
'I am looking to use a Velleman IR Break Beam kit to trigger the Prop-1. 
'I will need a predelay of 2 secs and a post-delay of 5 secs.

' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------


SYMBOL  Trigger         = PIN6                  ' SETUP = DN   P.6 W/R to COM/NO of remote
SYMBOL  Audio           = 0                     ' V+/OUT1 to 12v trigger inputs of Audio Player



' -----[ Constants ]-------------------------------------------------------


SYMBOL  Predelay        = 2000                  ' set predelay time here in ms
SYMBOL  Postdelay       = 5000                  ' set post-delay time here in ms
SYMBOL  Show_Time       = 15000                 ' set show time here in ms to match audio


' -----[ Variables ]-------------------------------------------------------

SYMBOL  timer           = B2                    ' for debounce/event time



' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00111111                              ' make P0-P5 outputs

  PAUSE Postdelay

' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0                                     ' reset timer

Check_Trigger:
  RANDOM lottery
  PAUSE 5                                       ' scan delay
  timer = timer + 5 * Trigger                   ' update timer
  IF timer < 200 THEN Check_Trigger             ' wait for 0.2 sec input

  PAUSE Predelay            ' start predelay

  HIGH Audio                                    ' start audio player/relays
  PAUSE 250
  LOW Audio

Start_Show:
  PAUSE Show_Time

  GOTO Reset 
William Stefan
The Basic Stamp Nut

JonnyMac

QuoteI am looking to use a Velleman IR Break Bea

If we don't make it you have to post a link to documentation.  If you make it easy for people to help you, they will.
Jon McPhalen
EFX-TEK Hollywood Office