November 21, 2024, 05:37:46 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.


Programming help?

Started by ChrisBartram, October 20, 2019, 06:27:42 PM

Previous topic - Next topic

ChrisBartram

Is JohnnyMac still around? I've got a fairly involved prop1 based animation sequence I need to program and would appreciate a headstart... Been a while since I've had to code on the prop1 and time is short (our opening night is Friday 10/25).
I can post the part layout and the sequence I'm looking for if someone is available? Setup includes a daisy-chained DC16 and RC4 and a Rogue Robotics uMP3.

Jeff Haas

JonnyMac isn't around anymore, but there are still a few of us checking in.  Post the info and we'll see what we can do.

ChrisBartram

Ok thanks.
Here's the connection layout:

Prop1
Out0: Actor Start button [Momentary - Normally Open]
Out1: Video Switch [Normally Open] (MedeaWiz Sprite media player)
2:
3:
4:
P5.w: -> uMP3 [transmit @2400Baud]
P5.r+b -> uMP3 power
P6.w: -> uMP3 [receive @2400Baud]
P7: -> DC16 => RC4

RC4
0: Spot on Coffin
1: Spot on Preacher
2: strobes +electric firecrackers
3: Coffin Fogger

DC16
1-9: candles (9)
10:
11:
12: Coffin popup (12v cylinder)
13: plant1 (12v cylinder)
14: plant2 (12v cylinder)
15: Preacher Power
16:

And here's the sequence I'm looking for:

Start:
All Candles on [DC16 1-9]
Wait for actor trigger
[Turn ON] Preacher Power
[Turn ON] Spot on Coffin
Send to uMP3: PC F /eulogypt1.mp3
Wait 60 seconds
[Turn OFF] Spot on Coffin
[Turn ON] Spot on Preacher
Wait 10 seconds
Cycle candles 1-9 [1 second on each]
[cycle 2 times; plant1 on; wait 1 second; plant1 off; plant2 on; wait 1 second; plant 2 off]
[Turn OFF] Spot on Preacher
Send to uMP3: PC F /eulogypt2.mp3
[Turn ON] Coffin Fogger
[Turn ON/close switch] MedeaWiz Sprite
Wait 3 seconds
[Turn ON] Strobes + Electric Firecrackers
[Turn ON] Spot on Coffin
[Turn ON] Coffin popup
Send to uMP3: PC F /exit.mp3
Pause 5 seconds
[Turn OFF] Spot on Coffin
[Turn OFF] Coffin popup
[Turn OFF] Coffin Fogger
[Turn OFF/open switch] MedeaWiz Sprite
[Turn OFF] Preacher Power
Goto Start

BigRez

October 21, 2019, 10:54:14 AM #3 Last Edit: October 21, 2019, 10:56:18 AM by BigRez
Sounds like all the parts I have in my Crate Beast, but with only a few days to go for you, I wouldn't have the time to modify my program to fit your needs.

I do remember that I wasn't able to get everything I wanted to fit into the prop-1 memory. JohnnyMac gave some great tricks  to condense the code, and I came up with some other things, but in the end I had to shorten the routine or move to a prop-2. Looking at what you've got connected and your routine, you might run into that issue as well.

Sorry I can't help... got too much to do myself.

Jeff Haas

Wow Chris...that's a complicated one!  I don't have a DC-16 or uMP3, so I can't test it.

However, take a look at this thread for BigRez's Crate Beast, he almost completely filled the Prop-1's memory:
http://www.efx-tek.com/php/smf/index.php?topic=1245.msg7326#msg7326

There is a link to the final version of his code at the bottom of the first page, it should be a good starting point.  Since you're not doing a shaking effect, you can cut the subroutine that handles the valves and get some space back.  I tried that and it helps a lot.  Also he has three triggers in there, you don't need those either - get rid of everything to do with "event" and you get a bit more back.  You will need to update the mp3 code to what you're used to using.

BigRez

Oh man... that was 10 years ago???

The program has gone through a few updates since then, mostly changing the timing routines. I'm actually about to start testing that prop before setting it up, so I'll familiarize myself with the code again if you have any questions.

Jeff Haas

Chris - Did you manage to get this done?  How did it go?

ChrisBartram

Managed to get my code pared down to fit on the PROP1 (with barely 2 bytes to spare) but the hardware failed spectacularly on me. Multiple components just wouldn't work right and I ran out of time :-(

BigRez

That's too bad.  Well, you've got 305 days to be ready for the next Halloween :)

It's never too early to start working on things...I just picked up two 4×8 foamboard panels for one of next Halloween's projects.

Jeff Haas

When you get that close to filling a Prop-1's memory, you should probably move up to a bigger controller.  You should be able to port the code to a Prop-2 pretty easily and many things will be simpler to do.  Of course you can go to an HC-8 but that's a different programming language.