November 22, 2024, 04:06: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.


Remote trigger for Prop-1

Started by HauntedWolf, September 25, 2013, 08:19:10 PM

Previous topic - Next topic

JackMan

To add on to Jon's reply, you probably will only be able to carry out one action at a time. For instance, if you press a button to raise the skull, you won't be able to trigger any other channel until the Prop-1 has completed the programmed action for the Skull (which is probably, raise it, pause, and then lower it for example).

HauntedWolf

Good point, thanks for mentioning it.
Robert

Haunted Wolf Hollow - http://www.hauntedwolfhollow.com

JonnyMac

I posted a how-to on connecting that remote -- in case you missed it, it's here:

* http://www.efx-tek.com/php/smf/index.php?topic=2075.0

There is a note about multiple inputs. IO pins connect to the input side of the ULN; this means that when you take a trigger signal from the remote on a pin that has the ULN connected, the OUTx terminal will operate. You could use this, then, to control very simple actions (pop-up, light, horn) that are separate from the normal program.

Note: There is no schematic for the remote so I don't know if the output is driven low. In that case I have to assume that is is and any pin used for direct control from the remote should not be used in your program.

Okay, I know you're dying to control a device from your program and independently from your remote. The only safe way to do it is to use one output or the program, another for direct control from the remote. It is safe to connect OUTx terminals together; when one of the other is active, your device will be active.

Here's a simple program that will control a horn from the program using OUT4 and from the remote button B using OUT5. OUT4 and OUT5 can be safely connected together.

' =========================================================================
'
'   File......
'   Purpose...
'   Author....
'   E-mail....
'   Started...
'   Updated...
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


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


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

SYMBOL  Trigger         = PIN6                  ' SETUP = DN (remote D1 -> P6)

' connect OUT5 and OUT4 together, then to horn (-)

SYMBOL  Horn2           = PIN5                  ' (remote D2 -> P5)
SYMBOL  Horn1           = PIN4


SYMBOL  Light3          = PIN2
SYMBOL  Light2          = PIN1
SYMBOL  Light1          = PIN0


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

SYMBOL  YES             = 1
SYMBOL  NO              = 0

SYMBOL  TR_ON           = 1                     ' active-high trigger
SYMBOL  TR_OFF          = 0

SYMBOL  IS_ON           = 1                     ' active-high I/O
SYMBOL  IS_OFF          = 0


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

SYMBOL  timer           = B2                    ' for debounce loop


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

Reset:
  PINS = %00000000                              ' all off
  DIRS = %00011111                              ' P4..P0 are outputs


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

Main:
  timer = 0                                     ' reset debounce timer

Check_Trigger:
  PAUSE 5                                       ' scan delay
  IF Trigger = TR_OFF THEN Main                 ' check trigger input
    timer = timer + 5                           ' update timer
  IF timer < 100 THEN Check_Trigger             ' check timer


  Light1 = IS_ON
  PAUSE 1000

  Light2 = IS_ON
  PAUSE 1000

  Light3 = IS_ON
  PAUSE 1000

  Horn1 = IS_ON
  PAUSE 2000

  GOTO Reset
Jon McPhalen
EFX-TEK Hollywood Office

HauntedWolf

Got the remote hooked up in place of the PIR....works like a charm!!!

Thanks all!
Robert

Haunted Wolf Hollow - http://www.hauntedwolfhollow.com