November 21, 2024, 10:04:34 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Need Help with a Program

Started by Dark Shadows, August 19, 2007, 09:24:05 AM

Previous topic - Next topic

Dark Shadows


Hey all, I have an Organist prop that I used for the past two years  and I think it's time to retire it. Im going to salvage the prop 1 though and use it for another prop I had in mind. The thing is, I had someone else program it for me, and I have no clue to program
it/write the codes. Can anyone program it for  me? I have the  software and cable I just need a code to be programmed into it  and
then I can set up the relays and outputs for the 110 volt and solenoids.  It's a simple code I bet, I just want the prop to do  this...

--------------------

Wait for trigger

Trigger Solenoid 1 (Opening door)

Wait 3 seconds

Trigger Solenoid 2 (Pop up corpse)

Let It stay up for about  10 seconds

Trigger Solenoid 3 (Spray a water mist for 5 seconds)

Stay up another 5 seconds

Bring prop back down(Solenoid 2)

Wait 3 seconds

Shut Door (Solenoid 1)

Pause with nothing for 1 miunte and 30 seonds and then wait  until re trigger

(I need an output for a trigger too, I think I'm using output 6  now)

-------------------

Can Anyone help me out? Im still working  on the prop, I need to wire all the electronics up now so I can test it!  Thanks

Mike
Dark Shadows

livinlowe

Mike-
While it might seem intimidating at first, try using the vixen software for this. Take a look at this thread:

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

Jon even has a preview mode that will show a picture of which outputs come on when! Its really cool, and, you don't need to research the programming aspects of your prop. You just paint on which output you want on when.

Holler if you got any concerns.
Shawn
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

Here's a PBASIC 1 program that matches your specs.  Just keep in mind that there's no such thing as "about" with a microcontroller; 10 seconds is 10 seconds -- dead on the nose.  So, if you want a range, say five to 10 seconds, you have to specify that.  Adding a random range like that isn't difficult and just takes a couple additional lines of code.

' =========================================================================
'
'   File...... Organist.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK
'   E-mail.... jwilliams@efx-tek.com
'   Started...
'   Updated... 19 AUG 2007
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


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


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


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

SYMBOL  Trigger         = PIN6                  ' P6; SETUP = DN
SYMBOL  Mister          = PIN2                  ' V+/OUT2
SYMBOL  Corpse          = PIN1                  ' V+/OUT1
SYMBOL  Door            = PIN0                  ' V+/OUT0


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

SYMBOL  IsOn            = 1
SYMBOL  IsOff           = 0

SYMBOL  IsOpen          = 1
SYMBOL  IsClosed        = 0

SYMBOL  IsUp            = 1
SYMBOL  IsDown          = 0


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

SYMBOL  delay           = W4                    ' for random delays
SYMBOL  lottery         = W5                    ' random value


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

Reset:
  PINS = %00000000                              ' clear everything
  DIRS = %00000111                              ' set outputs


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

Main:
  RANDOM lottery                                ' stir random value
  IF Trigger = IsOff THEN Main                  ' wait for trigger

  Door = IsOpen
  PAUSE 3000
  Corpse = IsUp
  Mister = IsOn
  PAUSE 5000
  Mister = IsOff
  PAUSE 5000
  Corpse = IsDown
  PAUSE 3000
  Door = IsClosed

Long_Delay:
  PAUSE 60000                                   ' one minute
  PAUSE 30000                                   ' 30 seconds

  GOTO Main


' -----[ Subroutines ]-----------------------------------------------------


' -------------------------------------------------------------------------


' -----[ EEPROM Data ]-----------------------------------------------------
Jon McPhalen
EFX-TEK Hollywood Office