i am just looking for a basic code to make sure my uMP3 is communicating with my Prop-2. My uMP3 is right out of the box. i havent made any changes. i tried a few codes on other topics but couldn't get anything out of the uMP3
There are several threads out here with code for a BS2 and uMP3. Have a look at this one: ump3 with the prop-2 (http://www.efx-tek.com/php/smf/index.php?topic=748.msg4156#msg4156)
Beyond that, you need to make sure the setup is correct betwen the uMP3 and the BS2 including the baud rate. Have a look through the Using the BS1-SA to Setup the uMP3 -- Yes, You Can! (http://www.efx-tek.com/php/smf/index.php?topic=1250.msg7015#msg7015) thread for some info on that.
Other setup info can be found here: UMP3 with the Prop-1 (http://www.efx-tek.com/php/smf/index.php?topic=255.msg1063#msg1063). It refers to the Prop-1 but connections are similar for the prop-2.
thanks bigrez. ive been reading them but im still having some problems with the communication. ive tried several different test codes i found but nothing yet. im gonna work on it a little bit more. i guess i have to get the BS1-SA adapter...
Get the docs for the uMP3 and check the default baud rate -- you may not have to change it. The only thing that may need changing is the response delay, if you need to use that. If you don't need to know when a file is finished then you can live without the response delay and you'll not be waiting for any responses from the player.
got ya...just incase i ordered a bunch of adapters from parallax...i couldnt find my adapter so better to be safe than sorry. im pretty sure im gonna need them anyway...i did check and it says the default is 9600. im pretty sure most of the demos i checked were 2400 and i was unsure how to change them. also, im not too worried about when the song is finished. basically i just want my program to start a song on initialization. then when a trigger is pressed, it quickly switches to another song. or fade in and out but i think just a fast switch will be great.
I added a Prop-2 demo to this thread: http://www.efx-tek.com/php/smf/index.php?topic=1251.0
it may be this part im getting stuck on...
' Put file # to play in "theMP3"
' -- add DATA label entries to LOOKUP as required
Play_MP3:
LOOKUP SFX01, [SFX0, SFX1, SFX2,
SFX3, SFX4, SFX5], eePntr ' get base address
i changed "theMP3" to SFX01 and wasn't sure about the DATA label...
not sure if this is right...
Swing and a miss! ;D
What you need to do is assign a value to "theMP3" that indicates which file in the list you're playing. The LOOKUP table points to the beginning of the file name which is stored in a DATA table (you need to edit that list).
You do note need edit the subroutine -- in fact, you broke it. If you're going to play more than six files then I'll make that change for you.
I never was good at baseball darn it...im only playing 2 files so it should be okay. as soon as i make it home ill try again. thanks
Just edit the list of names in the DATA table. Assign theMP3 a value of 0 to play the first, 1 to play the second.
It is working perfect... :D I am very excited
to me it looks like after the mp3 is done playing, i should be able to hit the trigger again for another song. if this is true, the uMP3 will play one song and then not respond to another trigger...but m very happy to hear music
Yes it should but without seeing your exact code as changed, we can't be sure there isn't something wrong with it. If you're using the demo program without modification other than your file names, then it's set up to play THREE files as posted. Either change the line
theMP3 = lottery // 3 ' make 0 - 2
into
theMP3 = lottery // 2 ' make 0 - 1
or put a third file on the card and at EEPROM location SFX2.
i didnt change a thing on the demo...i changed my mp3s and named them the same as what the demo used...
Check you file names; they MUST conform to DOS 8.3 standards -- this usually throws a few folks off as it's an easy miss.
i used the same name examples as u did in the demo code...it plays all the mp3's but between each i have to shut the prop 2 off and restart it...
Okay, let's stay on track here and not turn this into an unproductive, multi-page thread.
You don't need to play random files, you want to play one of two specific files. The purpose of running the test was to check the HARDWARE connection between your Prop-2 and the uMP3. Success! In your final code you will use straight SEROUTs instead of the demo routine as that will be easier and use less code.
Time to move on to the next hardware test. Once you've validated all of your hardware, you can start working on the application. This is the way John Barrowman and I develop every EFX-TEK product (the test code for the AP-16+ was a doozy! -- but now we can use it in production for testing units before they ship).