November 21, 2024, 05:55:09 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.


UMP3 with the Prop-1

Started by spookylake, September 13, 2007, 10:49:32 AM

Previous topic - Next topic

spookylake

I am getting ready for my newest project.  I have the UMP3 player and my Prop-1 but have a general question.....

When researching information on calling .mp3 files from the UMP3 player I have found lots of examples of random playing songs and such but I can't quite find a place for instructions on just playing one specific .mp3 file.

Granted I will pull multiple files from the UMP3 during the sequence but I will only pull one .mp3 file at a time.

Am I on the right track if i wanted to pull a file called "organ.mp3" from the UMP3 with the following code?

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

SYMBOL  Sio              = 7                     ' for DC-16
SYMBOL  Trigger        = PIN6                  ' setup = DN
SYMBOL  TX              = 5                     ' to UMP3.R; no ULN
SYMBOL  RX              = 4                     ' to UMP3.T; no ULN



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

SYMBOL  Baud           = OT2400
SYMBOL  Yes             = 1
SYMBOL  No              = 0


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

Reset:
  PAUSE 2000                                    ' let uMP3 start

Prod_uMP3:
  SEROUT TX, Baud, (13)                         ' send CR
  SERIN  RX, Baud, char                         ' get response



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

Main:

DEBUG ?Wait for trigger? ,cr
IF trigger = 0 THEN main

DEBUG ?Play sound file organ.mp3 from UMP3?
SEROUT TX, Baud, ("PC F /organ.mp3")            ' start play command


DEBUG "Ending Program" ,CR
DEBUG "HAPPY HAUNTING" ,CR
END

JonnyMac

You'll find everything you need to know in this thread:

-- http://www.efx-tek.com/php/smf/index.php?topic=39.0

In the demo program there is a subroutine called Play_MP3; you put a value, N, into "theMP3" and call that subroutine; it will play the Nth file from the list you create in EEPROM statements.
Jon McPhalen
EFX-TEK Hollywood Office

spookylake

JonnyMac,

I'm having issues just trying to configure this UMP3 player.  I think I may have found the issue.  You state that you use a USB2SER adapter to connect.  I am trying to use the BS1 serial adapter.........is this possible or am I spitting into the wind?

JonnyMac

Indeed you are; you cannot use the BS1 serial adapter to configure the uMP3, if you could, I would have told everybody.  You'll need to buy a USB2SER from Parallax.
Jon McPhalen
EFX-TEK Hollywood Office