May 18, 2024, 06:19:44 AM

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.


CAn you toggle two shows somehow on the HC8

Started by needcrew, February 24, 2013, 12:17:29 PM

Previous topic - Next topic

needcrew

Hi All,

I was wondering if it possible to have two shows that would be toggled between based on a simple switch.  I would like to control a 3 axis skull with led eyes and a solenoid to make him stand.  I would like to be able to change which sound track and head movements based on a toggle switch.  I.E. scarry is the default, less scary if the switch is toggled.

Thanks in advance

Mike

JonnyMac

Can you allow one show to finish before switching to the other? That simplifies things. If not, you can start a background cog that monitors the switch position (while a show is running) and if it changes, forces the controller to restart with the new show.
Jon McPhalen
EFX-TEK Hollywood Office

needcrew

Awesome.  So here is what I am thinking.  I would like to use the HC-8 with a AP-16 for sound.  The prop would be motion triggered and have that toggle ability based on the age of the people coming in.  I would use vixen to design the programs for the head movements  as I see there is a plug-in that can record joy stick movements for this already, and to define the trigger for the sound and LED eyes on the skull and trigger the solenoid.  I already have a SSC-32 for the servos.  Am I missing anything?

Thanks

Mike

JonnyMac

You're going to need a complex, hybrid program, but it's doable. The servo recorder program I wrote is stand-alone -- not designed to work with the SSC-32. You'd have to tell me what setup you want so that I could write you a streamer program for that you'd use with Vixen for programming, and then there would be a separate playback program. I have tried to consolidate the two (Just did a project for an OEM leading up to Transworld) but it gets very messy, so I like to separate those two.

I would suggest you forgo live programming and do it manually. It takes a little longer, but you ultimately get to the precision you want sooner.

So... how many servos are you running? Any other outputs? If the total # of servos and outputs (e.g., LEDs) is eight or less then everything can run right from the HC-8+.
Jon McPhalen
EFX-TEK Hollywood Office

needcrew

There would be the 3 servos for the head movement, a trigger for the sounds, one for the LED eyes on the skull, and one for the solenoid for the air piston.  So are you saying i would forgo the SSC-32 and just run the servos from the HC-8?  If so that would work, I just figured since I had the board for them it would be easier.  By manually programming are you referring to not using vixen at all and do it by hand?  I have done that with a few of my props that use the prop-1 and was hoping to avoid spending a ton of time on that aspect of the prop and more on the overall design and feel of the prop.

JonnyMac

With that set of outputs you can do everything from the HC-8+; that, in fact, is the easier way.

With only three servos it wouldn't be a big chore. In fact, using a strategy my friend Peter taught me, I think you'll get better, more refined movement more quickly by manually laying the tracks into Vixen that recording from a joystick and then trying to massage it later.

The key is doing the mouth movement FIRST. And here's a trick Peter taught me that gives great jaw performance and is easy to do: Move to a frame where a syllable starts. Drag select about a one-second ramp from open to closed. You can even copy this ramp for pasting in later. In fact, that's what you do: at the start of each syllable you paste in the ramp. At times the copy will overwrite part of the first -- this is normal and desired. Remember, an animatronic head doesn't have lips so we need to rely on the jaw movement. Peter started programming his shows (granted, with his own animation software but the technique is the same) this way and reduced a process that once took hours down to several minutes.

After the mouth movement is complete to your satisfaction, you can add the head movements. Having the head move around while you're trying to synchronize the voice is really difficult.
Jon McPhalen
EFX-TEK Hollywood Office

needcrew

That sounds like a good way to do it.  So for testing out the mouth movements would I use vixen wired to the HC-8 and AP-16? 

JonnyMac

No, you would import the audio you want to use in Vixen. It will play from there and stream the movements to the HC-8+ (that's the first of two programs). When you're happy with your shows you'll load a player program that, in your case, will let you select a show with a switch and start it with another. That program will talk to the AP-16+ and play the associated audio file.
Jon McPhalen
EFX-TEK Hollywood Office

needcrew

So to get started on this I would need the hc-8+ and vixen.  Is that it?

bsnut

Quote from: needcrew on February 26, 2013, 04:17:18 AM
So to get started on this I would need the hc-8+ and vixen.  Is that it?
First off welcome to the forums.

You also need the miroSD card adapter board to store the vixen files on, so the HC-8 can reed the vixen files that you created. You also need to download the vixen program if you haven't done so.
William Stefan
The Basic Stamp Nut

needcrew

Sweet.  I will have to get my order going.  How do I go about hooking this up for testing the servo movements?  Any info appreciated as it has been many years since my PROP-1 days.

JonnyMac

Please understand that going from the Prop-1 to the Propeller is a HUGE jump in programming, but I'll do it for you. All you have to do is connect the servos and Vixen and you can use Vixen to move the servos back and forth.

You have these outputs, right?

-- Servo1 (jaw)
-- Servo2 (pan?)
-- Servo3 (tilt?)
-- Eyes
-- Solenoid

I will setup the program so that you can in fact do 4 servos and for digital/LED outputs. The non-servo outputs are in fact PWM; for your valve channel you would only ever set that to 0% (off) or 100% (on). For LED channels you can use any value to control the brightness.
Jon McPhalen
EFX-TEK Hollywood Office

needcrew

There will be 4 servos for the skull. Nod, rotate and tilt and one for the jaw, one for the led eyes, one for triggering sound, and one for triggering a solenoid. Appreciate all the assistance.

Thanks

Mike

JonnyMac

February 26, 2013, 01:20:53 PM #13 Last Edit: February 26, 2013, 02:21:52 PM by JonnyMac
First things first.

As I stated, this is a 2-step process. In step 1 you load the attached program into your HC-8+ and then play values from Vixen through the programming port (using the Prop-Plug). The setup information for Vixen is in the top of the main program file, though the blank Vixen file attached is ready to go (you just need to set the serial port for your Prop-Plug).

This program lets you create shows in Vixen -- no coding required. You can synchronize with audio by bringing that file into Vixen to play. Once you're happy with a show you can export it as a Raw Data file (see the Vixen section for details on this).

In step 2 you will use a "player" program that will
a) send a start command through the serial port to the AP-16+
b) play the associated show file from a uSD card attached to the HC-8+ (you need the adapter for this).

By using serial control of the AP-16+ you have better control. You could, for example, have three shows of each type (kiddies and adults) and then randomize within the type based on your switch selection. Your player program is going to be custom, anyway, so I could add that feature if you would use it.
Jon McPhalen
EFX-TEK Hollywood Office

needcrew

So is the player program a program on the HC-8?  In an ideal situation the program would be triggered by a PIR sensor and based on the toggle switch play one show or the other.  Are they going to be multiple programs on the HC-8 or is a controlling PC required?  Sorry, I guess I am missing how this all fits together.