November 23, 2024, 11:33:36 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.


New to EFX-TEK & BASIC programming- need help with a program

Started by shupe1, June 08, 2011, 08:50:23 AM

Previous topic - Next topic

shupe1

Hi everyone!  I am brand new to the world of PBASIC, and EFX-TEK.  I am very excited to start learning and incorporating these controllers into our Haunted House this year.  I have been playing around with the Prop-1 Trainer this week, and have had SOME success.  The language is going to be the hardest part to learn.

Anyway, I have a program that I need some help with.  I want most of these steps to feel very random, so you don't see a pattern in it.  Here is what I am thinking:

Step 1-  P0-P5 are all ON at a variable intensity.  Randomly, one or two of the outputs at a time will fade down by 50 or 60% in 1 second and then restore in 1 second.  Ideally, this would repeat from anywhere between 10-45 seconds
                      - This is just to create some movement in the space

Step 2-  All outputs would randomly strobe (to simulate a power outage) for maybe 1 second, and then everything would blackout (all outputs OFF).  It would stay dark for maybe 1 second, and then repeat Step 1.

Does this make sense?  The part I am still trying to wrap my head around is how to use RANDOM, and how to make this not seem like a predefined loop.  Any help would be much appreciated.

Thanks!!

Travis

JonnyMac

Whoops... you cannot have P0 - P5 on at different intensities; they are either on or off or transitioning.  And the PWM command only works on one pin at a time.  You could have them all on and then randomly select one that would dim down to a random level and then back up, with a random delay between pins.  If this is okay I will write that code for you.
Jon McPhalen
EFX-TEK Hollywood Office

bsnut

What you want to do with the Prop-1 is more likelihood going to required a extra circuit. This means you will not be able to use the ULN, which the Outs 0 - 7 are connected to and you will need to use the header pins to do what you want to do.

My question to you is. What type of lights do you plan on using with the Prop-1? If, it is Leds and you can wait for the HC-8 to be available. The HC-8 can handle your task without any problems. The HC-8 comes programmed as an output control board. If, it is 120 vac lights the FC-4 is what you will need to handle your task.
William Stefan
The Basic Stamp Nut

shupe1

Thats right- I forgot that you can only have one output fading at a time on the Prop-1.  I am definitely planning on purchasing some HC-8s when they are available... but for now, lets just say that only one output is fading at a time.  I will be using LEDs as the source of light.

Thanks for your help!

JonnyMac

Okay, you'll have to redefine your program, because you can't do candle style flickering a slow fading at the same time -- when you're fading all of the other outputs must stay as the are (either on or off).  So... given these parameters with the Prop-1, how would you like the program to work?
Jon McPhalen
EFX-TEK Hollywood Office