November 23, 2024, 03:01:24 AM

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.


reloaded and now ump3 not responding

Started by spookylake, September 21, 2011, 07:22:32 PM

Previous topic - Next topic

spookylake


i can't believe this......i was afraid to reload the program on the prop-2 since it worked but i wanted to make changes to the servo movements.  i downloaded the config now the ump3 won't respond or play.
pin 7 is sending 5vdc to the ump3 (confirmed with voltmeter)

i had issues last time and jonny and i got it ironed out.  i don't know if i started this config with the "bad" ump3 version or what........i'm taking the coffing camping this weekend. (go figure)

any assistance from anyone would be greatly appreciated.

here is the config:


' =========================================================================
'
'   File......Coffin_2011
'   Purpose...Control the Animatronic Coffin Show
'   Author....Tony Shutters, Spookylake.com & Jon Williams, EFX-TEK
'   E-mail....props@spookylake.com & jwilliams@efx-tek.com
'   Started...Sept 21, 2011
'   Updated...
'
'   {$STAMP BS2}
'   {$PBASIC 2.5}
'
' =========================================================================


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


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


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

eyes            PIN     0
head            PIN     1
push            PIN     2
scary_terry     PIN     3
turn            PIN     4
turn_back       PIN     5
xx              PIN     6
TX              PIN     7
lid             PIN     8
prop            PIN     9
nod             PIN     10
arm             PIN     11
strobe          PIN     12
blacklight      PIN     13
xxxx            PIN     14
Trigger         PIN     15                      ' remove ULN and SETUP
pos          VAR     Word
delay        VAR     Nib

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

T2400           CON     396
T9600           CON     84
T38K4           CON     6
Inverted        CON     $4000
Open            CON     $8000
Baud            CON     Open + T9600

Yes             CON     1
No              CON     0

IsOn            CON     1                       ' for active-high in/out
IsOff           CON     0

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


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

Reset:
  OUTS = $0000                                  ' clear all outputs
  DIRS = $0000

  PAUSE 6000                                    ' for 1 Gig SD card

' -----[ Program Code ]----------------------------------------------------
setup:                               '

Main:
  IF Trigger = 0 THEN main                      ' Trigger awaiting motion detection
  HIGH blacklight                               ' Blacklight shines out from the crack of the lid
  SEROUT TX, Baud, ["PC F /b.mp3", CR]          ' Bell sound clip lets them know it is started
  PAUSE 40000                                   ' Pause till bells finish
  HIGH lid                                      ' Open Coffin lid
  SEROUT TX, Baud, ["PC F /Oz.mp3", CR]         ' Ozzy sound clip activated
  PAUSE 14000                                   ' Pause while music attracts their attention

Prop_Up:
  HIGH turn_back                                ' Holds prop straight before lifting
  HIGH prop                                     ' Raise prop
  LOW blacklight                                ' turn blacklight off
  HIGH strobe                                   ' turn strobe light ON
  PAUSE 4000
  GOSUB head_right                              ' turn head to crowd
  PAUSE 4000
  LOW turn_back
  HIGH turn                                     ' turn prop body toward crowd
  PAUSE 1000
  GOSUB head_full_left                          ' moves head from right to full left
  GOSUB head_nod
  PAUSE 1000
  LOW strobe                                    ' strobe off
  HIGH blacklight                               ' blacklight ON

Skull_Show:
  SEROUT TX, Baud, ["PC F /LR2.mp3", CR]        ' skull speech
  PAUSE 1000
  HIGH scary_terry                              ' turn on scary terry mouth controller board
  HIGH arm
  GOSUB eyes_left
  PAUSE 1000
  GOSUB head_left
  PAUSE 3000
  GOSUB eyes_left_center
  PAUSE 2000
  LOW arm
  GOSUB head_full_right
  PAUSE 200
  GOSUB head_nod
  PAUSE 1000
  GOSUB eyes_left
  PAUSE 3000
  GOSUB head_right_center
  GOSUB eyes_left_center
  PAUSE 3000
  GOSUB head_up
  PAUSE 500
  GOSUB eyes_left
  PAUSE 1000
  GOSUB eyes_full_right
  PAUSE 100
  GOSUB head_full_down
  GOSUB eyes_right_center
  PAUSE 2000
  HIGH arm
  GOSUB head_down_center
  GOSUB head_left
  PAUSE 500
  GOSUB eyes_right
  PAUSE 1000
  GOSUB head_nod
  PAUSE 2000
  GOSUB eyes_full_left
  GOSUB head_full_right
  GOSUB head_up
  PAUSE 3000
  GOSUB head_up_center
  GOSUB eyes_left_center
  LOW arm
  PAUSE 3000
  GOSUB eyes_left
  PAUSE 1000
  GOSUB head_left
  PAUSE 3000
  GOSUB eyes_left_center
  PAUSE 2000
  LOW arm
  GOSUB head_full_right
  PAUSE 200
  GOSUB head_nod
  PAUSE 1000
  GOSUB eyes_left
  PAUSE 3000
  GOSUB head_right_center
  GOSUB eyes_left_center
  PAUSE 3000
  GOSUB head_up
  PAUSE 500
  GOSUB eyes_left
  PAUSE 1000
  GOSUB eyes_full_right
  PAUSE 100
  GOSUB head_full_down
  GOSUB eyes_right_center
  PAUSE 2000
  HIGH arm
  GOSUB head_down_center
  GOSUB head_left
  PAUSE 500
  GOSUB eyes_right
  PAUSE 1000
  GOSUB head_nod
  PAUSE 2000
  GOSUB eyes_full_left
  GOSUB head_full_right
  GOSUB head_up
  PAUSE 3000
  GOSUB head_up_center
  GOSUB eyes_left_center
  LOW arm
  PAUSE 3000
  LOW scary_terry


Prop_Down:
  SEROUT TX, Baud, ["PC F /o.mp3", CR]          ' organ
  PAUSE 3000
  LOW turn                                      ' turn prop straight
  HIGH turn_back
  LOW scary_terry
  LOW blacklight                                ' blacklight off
  HIGH strobe                                   ' strobe ON
  GOSUB head_right
  GOSUB eyes_right
  PAUSE 8000
  GOSUB head_left_center
  GOSUB eyes_left_center
  LOW prop                                      ' lay prop down
  PAUSE 6000
  HIGH push
  PAUSE 2000
  LOW push
  LOW strobe                                    ' turn strobe off
  PAUSE 10000

  Close_Lid:
  HIGH blacklight                               ' blacklight on
  LOW lid                                       ' close lid blacklight on
  SEROUT TX, Baud, ["PC F /h.mp3", CR]          ' Halloween Movie sound clip
  PAUSE 50000
  PAUSE 50000

GOTO main


' -----[ Subroutines ]-----------------------------------------------------
eyes_right:
  FOR pos = 700 TO 400 STEP 4               ' eyes from center to the right
    FOR delay = 1 TO 3
     PULSOUT eyes, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

eyes_right_center:
  FOR pos = 400 TO 700 STEP 4               ' eyes from right to the center
    FOR delay = 1 TO 3
     PULSOUT eyes, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

eyes_left:
  FOR pos = 700 TO 800 STEP 4               ' eyes from center to the left
    FOR delay = 1 TO 3
     PULSOUT eyes, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

eyes_left_center:
  FOR pos = 800 TO 700 STEP 4               ' eyes from left to center
    FOR delay = 1 TO 3
     PULSOUT eyes, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

eyes_full_left:
  FOR pos = 400 TO 800 STEP 4               ' eyes from full right to full left
    FOR delay = 1 TO 3
     PULSOUT eyes, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

eyes_full_right:
  FOR pos = 800 TO 400 STEP 4               ' eyes from full left to full right
    FOR delay = 1 TO 3
     PULSOUT eyes, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_right:
  FOR pos = 400 TO 700 STEP 4               ' head from center to the right
    FOR delay = 1 TO 3
     PULSOUT head, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_right_center:
  FOR pos = 700 TO 400 STEP 4               ' head from right to the center
    FOR delay = 1 TO 3
     PULSOUT head, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_left:
  FOR pos = 400 TO 300 STEP 4               ' head from center to the left
    FOR delay = 1 TO 3
     PULSOUT head, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_full_left:
  FOR pos = 700 TO 300 STEP 4               ' head from full right to full left
    FOR delay = 1 TO 3
     PULSOUT head, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_left_center:
  FOR pos = 300 TO 400 STEP 4               ' head from full left to center
    FOR delay = 1 TO 3
     PULSOUT head, pos
     PAUSE 5
    NEXT
  NEXT
  RETURN

  head_full_right:
  FOR pos = 300 TO 700 STEP 4               ' head from full left to full right
    FOR delay = 1 TO 3
     PULSOUT head, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_nod:
  FOR pos = 700 TO 300 STEP 4               ' head nods twice from center returning to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
  FOR pos = 300 TO 800 STEP 4               ' head nods twice from center returning to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
    FOR pos = 800 TO 300 STEP 4             ' head nods twice from center returning to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
    FOR pos = 300 TO 800 STEP 4             ' head nods twice from center returning to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
    FOR pos = 800 TO 700 STEP 4             ' head nods twice from center returning to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_up:
  FOR pos = 700 TO 300 STEP 4               ' head looks up from center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_up_center:
  FOR pos = 300 TO 700 STEP 4               ' head from up to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_down:
  FOR pos = 700 TO 800 STEP 4               ' head looks down from center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_down_center:
  FOR pos = 800 TO 700 STEP 4               ' head from down to center
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_full_up:
  FOR pos = 800 TO 300 STEP 4               ' head from down to up
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

head_full_down:
  FOR pos = 300 TO 800 STEP 4               ' head from up to down
    FOR delay = 1 TO 3
     PULSOUT nod, pos
     PAUSE 5
    NEXT
  NEXT
RETURN

' ------[ available songs on ump3 ]----------------------------------------

' "h"                 Halloween movie theme song
' "Oz"                Ozzy 30 second clip
' "o"                 Organ music
' "b"                 Tolling funeral bells
' "little_girl"       Spooky girl calling for her mommy
' "teaparty"          Spooky girl asking if you want to have a teaparty
' "skull"             Speach for the skull
' "LR"                speach Lake Rudolph option #1
' "LR2"               speach Lake Rudolph option #2
' "2011"              Speach for 2011 skull

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

bsnut

What was your problem last time that Jon helped you out? Can you manually trigger your audio player?
William Stefan
The Basic Stamp Nut

spookylake

the ump3 player played just moments before with the old config on the prop-2.

once i loaded this config it stopped.
i've loaded several of the ump3 tests with no luck.

as you can see in the config i don't have a lot of the program info for the ump3.  All i do is send a serout command to the ump3 to play a certain song.
i'm not concerned with receiving feedback or anything.

the serout sends my 5vdc to the ump and a transmit wire in order to get the connection

maybe i need a pause from when i send the power to the ump and the command to start the song to allow the ump to boot up and be ready for the song transmit request. 

i'm getting short on time.  we are leaving tomorrow.  i'd love to get this working tonight

JonnyMac

Try removing the "Open" from the serial designation and just drive the serial.  Since the uMP3 is not on a buss and does not talk back on that pin you don't have to use "open" mode.  Also, at the beginning of the program use

HIGH TX

... to set the serial line to the idle state.

Serial comms can be a little tricky which is why I am so persnickety as to which pins get used and how you do it.  Sending serial messages isn't quite the same as making pins HIGH and LOW, there are other considerations for the connections.
Jon McPhalen
EFX-TEK Hollywood Office

spookylake

OMG.....the SD memory card was in upside down

what an idiot
i didn't figure it out until i connected to the UMP3 to look at its config and settings.  when i went to run a test it errored with "no memory card installed". 

i feel both relieved and of a fool

thanks for all the help

BigRez

Yeah, like none of us have ever done that before ;) ;). I wrote on my uMP3 payers to indicate the direction on the card.

Jeff Haas

It could've been worse...you could have fried a component in a brand-new board (which I know from experience).