November 21, 2024, 03:50:39 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Prop1/ump3/RC-4/HB-25

Started by zeenon, March 05, 2007, 03:32:53 PM

Previous topic - Next topic

zeenon

Jon,

Can you show me how to connect the above?

I built the special cable for the ump3 that was on the old forums going to P4/P5 on the Prop-1. The HB-25 is going to P7.  I have a pressure switch on P6. Where does the RC-4 connect to? P3 I'm guessing. Or does it bridge like an AP-8 to P7?

Also, I have the wall wart for the Prop-1 and I'm running a 12V Computer PS for the HB25 (on the 12V input) I didn't think the wall wart can put out the amps I needed for a wiper motor. See any problems with this?

Z

JonnyMac

Z,

Question: Are you using any of the local OUTx terminals for this prop?  If not, just pull the ULN and don't bother cutting pins.  Otherwise, you'll need to remove pins 1 - 5 to ensure the ULN doesn't interfere with any of your device signalling.

You can connect the RC-4 to P7 and the HB25 to P3; it won't matter to the program.  You can't use the same pin, though, because the RC-4 needs serial data and the HB25 needs a specific (servo-type) pulse.  You can use a standard 3-pin cable for the HB25 as it behaves just like a servo.  If your pressure switch is normally-open, connect its contacts between P6.W (signal) and P6.R (+5) -- that way, when the pressure switch closes, you will get a high (1) on PIN6 (make sure the SETUP pin is DN).

The HB25 has some special requirements, so you actually have to define two pins for it when using the Prop-1:

SYMBOL  Motor           = 3
SYMBOL  MtrReady        = PIN3


Now, the HB25 does a bit of internal setup before you can send it speed commands, so add this setup AFTER the uMP3 initialization:

Motor_Hold:
  PAUSE 100
  IF MtrReady = No THEN Motor_Hold
  LOW Motor
  PULSOUT Motor, 150


This works because on reset all I/O pins are inputs, so we can watch PIN3 (MtrReady) for the signal that the HB25 can be commanded.  This signal comes in the form of a high level.  When the HB25 is doing its internal setup it holds this pin low to signal the master that's not yet ready.  After that we can make P3 (Motor) low and then send a standard centering pulse to stop the motor.  After that, it's set-and-forget; the HB25 behaves like a big continuous-rotation servo, but it doesn't require constant refreshing.

Let me suggest that you get one element working at a time.  Start with the trigger (just use DEBUG to see the result), then the RC-4, the the uMP3, finally, add in the HB25.  If you try to do everything at once you're liable to create a bug in one area that has you hunting in another.  Trust me, I've been there... more times than I can count.



Jon McPhalen
EFX-TEK Hollywood Office

zeenon

Jon,

Good advice I will definitely work with one board at a time. I wanted to get all the code into one bs1 file and then I can start moving stuff around in the code. Note this is just an example and is really REALLY bad code but I wanted to get an idea of how much memory i had left. The question I always had and I've fought my way through it for the last year......can you explain this:

SYMBOL  Motor           = 3
SYMBOL  MtrReady        = PIN3

PIN3 relates to P3 on the Prop-1?? Then what does the =3 not OUT3?? I've always been confused about this part?




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

SYMBOL  HB25            = 7                     ' I/O Pin For HB-25
SYMBOL  trigger         = PIN6                  ' SETUP = DN
SYMBOL  TX              = 5
SYMBOL  RX              = 4
SYMBOL  fogger          = 2                     ' Pin assigned to fogger's 1/8" jack


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

SYMBOL  Yes             = 1
SYMBOL  No              = 0


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

SYMBOL  index           = B0                    ' Variable Space For Ramp Counter
SYMBOL  status          = B2                    ' uMP3 status character

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

reset:

'         76543210                        ' bit positions
  DIRS = %00000100                        ' make P2 output
  PINS = %00000000                        ' P7 - P0 off


Startup:
IF PIN7 = 0 THEN Startup                ' Wait For HB-25 Power Up (P0)
LET             DIRS =  %10000001       ' Set PIN0 To Output
PAUSE 5                                 ' Wait For HB-25 To Initialize
PULSOUT HB25, 150                       ' Stop Motor
PAUSE 20                                ' Wait 20 mS

Prod_uMP3:
SEROUT TX, OT2400, (13)                       ' send CR
SERIN  RX, OT2400, status                     ' get response
IF status <> ">" THEN Prod_uMP3               ' wait for ">"





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




' We start each cycle up here.
' We will come here after every run of the program.
main3:
  IF trigger = isOff THEN main            ' Press button to start program
  HIGH FOGGER                             ' Blast the fogger

wait:
  IF trigger = isOn THEN wait             ' Keep blasting as long as button is pressed
  LOW fogger                              ' Stop blasting when button is released
  GOTO main                               ' Back to the top


Main:
  IF Trigger = No THEN Main                     ' wait for trigger

Start_Audio:
  SEROUT TX, OT2400, ("PC F /SFX0.MP3", 13)



Main2:
  FOR index = 150 TO 200                ' Ramp Up To Full Speed
    PULSOUT HB25, index                 ' Motor Forward
    PAUSE 150                           ' 150 mS Smoothing Delay
  NEXT
  PAUSE 3000                            ' Wait 3 Seconds
  FOR index = 200 TO 150 STEP -1        ' Ramp Back Down
    PULSOUT HB25, index                 ' Motor Forward Slowing
    PAUSE 150                           ' 150 mS Smoothing Delay
  NEXT

Finish:
  GOTO Finish                           ' Prevent PIN0 From Changing State

JonnyMac

March 06, 2007, 01:17:58 PM #3 Last Edit: March 06, 2007, 01:19:47 PM by JonnyMac
Probably the most confusing aspect of using a microcontroller is that pins can have two modes: input (default) and output (must be set).  When we want to look at a signal sitting on an input pin we read the pin's input register, this is done with the PINx designation.  When the pin is in output mode we only refer to it by its number.  Now, you can still read the input register when in output mode, but that register will reflect the current state of the output driver and not any external signal.

Review:
  -- When looking at an input, use PINx (x is the pin number to read, pin must be in input mode)
  -- When writing to an output, use x (the pin number to be modified; it must be in output mode)

PBASIC is pretty smart and command will set the state appropriately.  HIGH and LOW, for example, make the specified pin an output and the write a 1 (high) or 0 (low) to it.  SERIN makes the specified pin an input (which disconnects the output circuitry from the pin) so the outside world can affect it.

I would put the HB25 code after the uMP3 -- the uMP3 takes longer but requires prompting, so by the time the uMP3 is ready the HB25 should be:


Check_uMP3:
  SEROUT TX, T2400, (CR)
  SERIN RX, T2400, char
  IF char <> ">" THEN Check_uMP3

Check_HB25:
  IF MtrReady = No THEN Check_HB25
  LOW Motor
  PULSOUT Motor, 150
  PAUSE 10

Setup:
  ' set other I/O pins here and continue with program


Note: you don't need more than 10 milliseconds between HB25 command pulses, and the spacing can be as long as you need since it's set-and-forget.
Jon McPhalen
EFX-TEK Hollywood Office

zeenon

Jon,

I refined the code in sections and came up with the following (see code) Everything works :) and now it's just a matter of moving code around. I do get a weird problem with the HB25, every so often when I power off then on the Prop-1 the motor starts spinning. Hitting the trigger goes through the program as normal, an looks like it resets the HB-25. I have the Prop-1 on the 12V (from EFX) and the HB25 on a computer PS (12V). Does it look like a false trigger or did I mess the code up?

Z

'   {$STAMP BS1}
'   {$PBASIC 1.0}
'   {$PORT COM8}
'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
' =========================================================================
' NOTES:
'
' The following program uses a Prop-1, RC-4, HB25, and a uMP3
'
' Prop-1 power via wal-wart (12v from EFX-tek)
' RC-4/uMP3 needs no power
' HB25 uses 12V off computer PS (needed for the amps for wiper motor)
'
' Prop-1 moded ULN pins 1 to 5 cut/P7 jumper OFF/P6 jumper DOWN
' Prop-1 P7 is connected to HB25 (observe polarity)
' Prop-1 P6 is trigger to start connected to WR
' Prop-1 P5 WRB is connected to uMP3 via special cable (R to +/B to G/W to R)
' Prop-1 P4 W is connected to uMP3 via special cable (W to T (yellow wire)
' Prop-1 P3 is connected to RC-4 (observe polarity)
' Prop-1 V+/OUT2 is to 1/8" fogger plug
'
' Triggering P6 will start electric chair.
'==========================================================================
' -----[ Revision History ]------------------------------------------------


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

SYMBOL  HB25            = 7                     ' I/O Pin For HB-25
SYMBOL  MtrReady        = PIN7
SYMBOL  trigger         = PIN6                  ' SETUP = DN
SYMBOL  TX              = 5
SYMBOL  RX              = 4
SYMBOL  RC4             = 3
SYMBOL  fogger          = 2                     ' Pin assigned to fogger's 1/8" jack

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

SYMBOL  YES             = 1
SYMBOL  NO              = 0
SYMBOL  ON              = 1
SYMBOL  OFF             = 0


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


SYMBOL  relays             = B0                   ' RC-4 relays (B0 is made up of BIT0 to BIT7)
SYMBOL  light1             = BIT0
SYMBOL  light2             = BIT1                 ' Relays
SYMBOL  relay3             = BIT2
SYMBOL  relay4             = BIT3

SYMBOL  index              = B1                    ' Variable Space For Ramp Counter

SYMBOL  status             = B2                    ' uMP3 status character


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

RESET:

'         76543210                        ' bit positions
  DIRS = %00000100                        ' make P2 output for fogger
  PINS = %00000000                        ' P7 - P0 off


SEROUT RC4, OT2400, ("!RC4", %00, "X")    ' Reset all relays

Check_uMP3:
  SEROUT TX, OT2400, (13)                  ' send CR
  SERIN RX, OT2400, status                 ' get response
  IF status <> ">" THEN Check_uMP3         ' wait for ">"

Check_HB25:
  IF MtrReady = NO THEN Check_HB25
  LOW HB25
  PULSOUT HB25, 150
  PAUSE 10


' -----[ Program Code ]----------------------------------------------------
' Light in back on - Moan/help MP3 - Movement - Shock MP3/Strobe/Fast Movement - Fog - Shock MP3/Strobe/Fast Movement
Main:
IF Trigger = OFF THEN Main                     ' wait for trigger

light1 = ON
light2 = ON
relay3 = ON
relay4 = ON
SEROUT RC4, OT2400, ("!RC4", %00, "S", relays)
PAUSE 3000
SEROUT RC4, OT2400, ("!RC4", %00, "R", 4, 0)
PAUSE 3000
SEROUT RC4, OT2400, ("!RC4", %00, "R", 2, 0)

SEROUT TX, OT2400, ("PC F /SFX0.MP3", 13)

HIGH fogger
PAUSE 2000
LOW fogger

Main2:
  FOR index = 150 TO 200                ' Ramp Up To Full Speed
    PULSOUT HB25, index                 ' Motor Forward
    PAUSE 200                           ' 150 mS Smoothing Delay
  NEXT
  PAUSE 3000                            ' Wait 3 Seconds
  FOR index = 200 TO 150 STEP -1        ' Ramp Back Down
    PULSOUT HB25, index                 ' Motor Forward Slowing
    PAUSE 200                           ' 150 mS Smoothing Delay
  NEXT


GOTO RESET

'SEROUT RC4, OT2400, ("!RC4", %00, "X")
'SEROUT RC4, OT2400, ("!RC4", %00, "R", relay4, OFF)



'Finish:
'  GOTO Finish                           ' Prevent PIN0 From Changing State

JonnyMac

I'll look at the code, but keep in mind that computer power supplies are notoriously problematic if not properly loaded (not the way we humans get loaded).  You might try putting an LED circuit across the output of the motor supply that draws enough current to keep the switching regulator working properly; the output can fly around if this isn't the case, and that may be upsetting the HB25.
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

March 13, 2007, 06:49:07 PM #6 Last Edit: March 13, 2007, 06:54:30 PM by JonnyMac
Okay, I think I found the trouble.  You're jumping all the way back to Reset which is prompting the uMP3 (no problem) and then looking for the HB25 to be ready -- that's the problem.  You see, after the HB25 is ready we make its control pin an output and drive it low (except for the high-going pulses when we need to tell the motor to change speed).  Since the pin is an output low, going back to Check_HB25 will stick there because the pin is now low and isn't going to go high until you reset the Prop-1.  The fix is easy: just reorder the top part of your program like this:

Check_uMP3:
  SEROUT TX, OT2400, (13)                       ' send CR
  SERIN  RX, OT2400, status                     ' get response
  IF status <> ">" THEN Check_uMP3              ' wait for ">"

Check_HB25:
  IF MtrReady = NO THEN Check_HB25

Reset:
'         76543210                              ' bit positions
  DIRS = %10000100                              ' P7 (HB25) and P2 (Fogger) are outputs
  PINS = %00000000                              ' P7 - P0 off

  SEROUT RC4, OT2400, ("!RC4", %00, "X")        ' Reset all relays

  PULSOUT HB25, 150                             ' stop the HB25
  PAUSE 10


Just another note: Since you're setting the outputs manually, you don't have to use HIGH and LOW, you can write directly to the outputs like this:

  Fogger = ON
  PAUSE 3000
  Fogger = OFF


And let me recommend you change those symbols to IsOn and IsOff because ON is a PBASIC 2.x keyword.
Jon McPhalen
EFX-TEK Hollywood Office

zeenon

Jon,

On your note, do I have to define 'fogger' another way? I changed it to:

fogger = IsON
PAUSE 3000
fogger = IsOFF

and I'm getting an error in the compiler.

Z


JonnyMac

Sorry, yes you do -- use the PINx variant so that you can write directly to the output register.   With the Prop-2 there is a PIN directive (used instead of SYMBOL) that makes this process a bit easier as it understands your context.
Jon McPhalen
EFX-TEK Hollywood Office

zeenon

Jon,

Can I slim this down in any way to get more memory for use with a Prop-1 or is a Prop-2 my only choice here:

'   {$STAMP BS1}
'   {$PBASIC 1.0}

'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
' =========================================================================
' NOTES:
'
' The following program uses a Prop-1, RC-4, HB25, and a uMP3
'
' Prop-1 power via wal-wart (12v from EFX-tek)
' RC-4/uMP3 needs no power
' HB25 uses 12V off computer PS (needed for the amps for wiper motor)
'
' Prop-1 moded ULN pins 1 to 4 cut/P7 jumper OFF/P6 jumper DOWN
' Prop-1 P7 is connected to HB25 (observe polarity)
' Prop-1 P6 is trigger to start connected to WR
' Prop-1 P5 WRB is connected to uMP3 via special cable (R to +/B to G/W to R)
' Prop-1 P4 W is connected to uMP3 via special cable (W to T (yellow wire)
' Prop-1 P3 is connected to RC-4 (observe polarity)
' Prop-1 V+/OUT2 is to 1/8" fogger plug
'
' Triggering P6 will start electric chair.
'==========================================================================
' -----[ Revision History ]------------------------------------------------


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

SYMBOL  HB25            = 7                     ' I/O Pin For HB-25
SYMBOL  MtrReady        = PIN7
SYMBOL  trigger         = PIN6                  ' SETUP = DN
SYMBOL  TX              = 5
SYMBOL  RX              = 4
SYMBOL  RC4             = 3
SYMBOL  fogger          = 2                     ' Pin assigned to fogger's 1/8" jack

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

SYMBOL  NO                = 0
SYMBOL  IsON              = 1
SYMBOL  IsOFF             = 0


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


SYMBOL  relays             = B0                   ' RC-4 relays (B0 is made up of BIT0 to BIT7)
SYMBOL  light1             = BIT0
SYMBOL  light2             = BIT1                 ' Relays
'SYMBOL  relay3             = BIT2
'SYMBOL  relay4             = BIT3

SYMBOL  index              = B1                    ' Variable Space For Ramp Counter

SYMBOL  status             = B2                    ' uMP3 status character


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

Check_uMP3:
  SEROUT TX, OT2400, (13)                  ' send CR
  SERIN RX, OT2400, status                 ' get response
  IF status <> ">" THEN Check_uMP3         ' wait for ">"

Check_HB25:
  IF MtrReady = NO THEN Check_HB25

Reset:
'         76543210                        ' bit positions
  DIRS = %10000100                        ' P7 (HB25) and P2 (Fogger) are outputs
  PINS = %00000000                        ' P7 - P0 off

SEROUT RC4, OT2400, ("!RC4", %00, "X")    ' Reset all relays

PULSOUT HB25, 150                         ' stop the HB25
PAUSE 10

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

Main:
IF Trigger = IsOFF THEN Main                     ' wait for trigger

Part1:
' Get me outta here
SEROUT RC4, OT2400, ("!RC4", %00, "R", 1, 1)     ' flickering light on
PULSOUT HB25, 160                                ' slow movement
SEROUT TX, OT2400, ("PC F /SFXA.MP3", 13)        ' play sfx
PAUSE 5000
SEROUT RC4, OT2400, ("!RC4", %00, "R", 1, 0)     ' flickering light off
PAUSE 1000


Part2:
' A flick of the switch
GOTO fog
SEROUT RC4, OT2400, ("!RC4", %00, "R", 2, 1)     ' turn on strobe
SEROUT TX, OT2400, ("PC F /SFXC.MP3", 13)        ' play shock sfx

FOR index = 160 TO 200                           ' Ramp Up To Full Speed
   PULSOUT HB25, index                           ' Motor Forward
   PAUSE 400                                     ' 150 mS Smoothing Delay
NEXT

PULSOUT HB25, 150                                ' no movement
SEROUT RC4, OT2400, ("!RC4", %00, "R", 2, 0)     ' turn off strobe
SEROUT RC4, OT2400, ("!RC4", %00, "R", 1, 1)     ' flickering light on

Part3:
' Not Again
GOTO fog
SEROUT RC4, OT2400, ("!RC4", %00, "R", 2, 1)     ' turn on strobe
SEROUT TX, OT2400, ("PC F /SFXD.MP3", 13)        ' play shock sfx

FOR index = 170 TO 200                           ' Ramp Up To Full Speed
   PULSOUT HB25, index                           ' Motor Forward
   PAUSE 400                                     ' 150 mS Smoothing Delay
NEXT

SEROUT RC4, OT2400, ("!RC4", %00, "R", 2, 0)     ' turn off strobe
SEROUT RC4, OT2400, ("!RC4", %00, "R", 1, 1)     ' flickering light on

Part4:
Ending

  FOR index = 200 TO 150 STEP -1        ' Ramp Back Down
    PULSOUT HB25, index                 ' Motor Forward Slowing
    PAUSE 200                           ' 150 mS Smoothing Delay
  NEXT

GOTO RESET

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

fog:
HIGH fogger
PAUSE 1000
LOW fogger
RETURN


JonnyMac

March 15, 2007, 11:16:40 AM #10 Last Edit: March 15, 2007, 11:20:02 AM by JonnyMac
All the SEROUT are what's doing it, especially when using the R command with the RC-4; in a couple places you're sending two R commands that can be handled with one S command.  The version below fits into memory with about 19% left by putting things into subroutines and calling them (with GOSUB, not GOTO as in your original program).

Just a comment... be mindful of your formatting as it's starting to get a little... uh, loose.  I have found in 25 years of programming that most errors slip in and are hard to find because of poor formatting habits; keep things neat and fewer bugs will show up.  In the PBASIC editor there is a document called "The Elements of PBASIC Style" that will help.


'   {$STAMP BS1}
'   {$PBASIC 1.0}

'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
' =========================================================================
'
' NOTES:
'
' The following program uses a Prop-1, RC-4, HB25, and a uMP3
'
' Prop-1 power via wal-wart (12v from EFX-tek)
' RC-4/uMP3 needs no power
' HB25 uses 12V off computer PS (needed for the amps for wiper motor)
'
' Prop-1 moded ULN pins 1 to 4 cut/P7 jumper OFF/P6 jumper DOWN
' Prop-1 P7 is connected to HB25 (observe polarity)
' Prop-1 P6 is trigger to start connected to WR
' Prop-1 P5 WRB is connected to uMP3 via special cable (R to +/B to G/W to R)
' Prop-1 P4 W is connected to uMP3 via special cable (W to T (yellow wire)
' Prop-1 P3 is connected to RC-4 (observe polarity)
' Prop-1 V+/OUT2 is to 1/8" fogger plug
'
' Triggering P6 will start electric chair.

'==========================================================================


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


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

SYMBOL  HB25            = 7                     ' I/O Pin For HB-25
SYMBOL  MtrReady        = PIN7
SYMBOL  Trigger         = PIN6                  ' SETUP = DN
SYMBOL  TX              = 5
SYMBOL  RX              = 4
SYMBOL  RC4             = 3
SYMBOL  Fogger          = 2                     ' Pin assigned to fogger's 1/8" jack


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

SYMBOL  Yes             = 1
SYMBOL  No              = 0

SYMBOL  IsOn            = 1
SYMBOL  IsOff           = 0

SYMBOL  MtrStop         = 150


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


SYMBOL  relays          = B0                    ' RC-4 relays (B0 is made up of BIT0 to BIT7)
SYMBOL  flicker         = BIT0
SYMBOL  strobe          = BIT1
SYMBOL  relay3          = BIT2
SYMBOL  relay4          = BIT3

SYMBOL  mtrSpeed        = B1                    ' HB25 speed
SYMBOL  sfx             = B2                    ' sound FX file "A".."Z"
SYMBOL  status          = B3                    ' uMP3 status character


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

Check_uMP3:
  SEROUT TX, OT2400, (13)                       ' send CR
  SERIN RX, OT2400, status                      ' get response
  IF status <> ">" THEN Check_uMP3              ' wait for ">"

Check_HB25:
  IF MtrReady = No THEN Check_HB25

Reset:
'         76543210                              ' bit positions
  DIRS = %10000100                              ' P7 (HB25) and P2 (Fogger) are outputs
  PINS = %00000000                              ' P7 - P0 off

  relays = %0000                                ' reset all relays
  GOSUB Set_RC4

  PULSOUT HB25, MtrStop


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

Main:
  IF Trigger = IsOFF THEN Main                  ' wait for trigger

Part1:
  ' Get me outta here
  relays = %0001                                ' flickering light on
  GOSUB Set_RC4
  PULSOUT HB25, 160                             ' slow movement
  sfx = "A"
  GOSUB Play_SFX
  PAUSE 5000
  relays = %0000
  GOSUB Set_RC4                                 ' flickering light off
  PAUSE 1000

Part2:
  ' A flick of the switch
  GOSUB Fog
  relays = %0010
  GOSUB Set_RC4
  sfx = "C"
  GOSUB Play_SFX
  FOR mtrSpeed = 160 TO 200                     ' Ramp Up To Full Speed
    PULSOUT HB25, mtrSpeed                      ' send speed command
    PAUSE 400                                   ' Smoothing Delay
  NEXT

  ' NOTE: no ramp down could be dangerous....
  ' -- might cause a lot of back EMF when the motor stops

  PULSOUT HB25, MtrStop                         ' no movement (???)
  relays = %0001                                ' strobe off, flicker on
  GOSUB Set_RC4

Part3:
  ' Not Again
  GOSUB Fog
  relays = %0011                                ' turn on strobe
  GOSUB Set_RC4
  sfx = "D"
  GOSUB Play_SFX                                ' play shock sfx

  FOR mtrSpeed = 170 TO 200
    PULSOUT HB25, mtrSpeed                      ' send speed command
    PAUSE 400
  NEXT

  relays = %0001                                ' strobe off, flicker on
  GOSUB Set_RC4

Part4:
  ' Ending
  FOR mtrSpeed = 200 TO MtrStop STEP -1         ' ramp down
    PULSOUT HB25, mtrSpeed                      ' send speed command
    PAUSE 200
  NEXT

  GOTO Reset


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

Set_RC4:
  SEROUT RC4, OT2400, ("!RC4", %00, "S", relays)
  RETURN

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

Play_SFX:
  SEROUT TX, OT2400, ("PC F /SFX", sfx, ".MP3", 13)
  RETURN

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

Fog:
  HIGH Fogger
  PAUSE 1000
  LOW Fogger
  RETURN

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



Jon McPhalen
EFX-TEK Hollywood Office

zeenon

I'll post some better pictures of the back of the assembly tonight, but here is the new improved electric chair built around the Prop-1:

http://www.deadmansinne.com

Videos #3 and #4 are the newest. I still plan on adding 2 fans with scents to the chair, so the code is not final yet.

Z