VMusic3 Library (USB / MP3 / WMA module)

Hey everyone,

I've created a library to use the VMusic3 USB/MP3/WMA module:
http://www.retrojdm.com/Files/VMusic3.zip

Main Features

  • Play / Pause / Stop
  • Fast-forward / Rewind
  • Next / Prev track
  • Next / Prev folder (walks directory tree, stopping on folders with MP3/WMA files)
  • Set volume
  • "Keep Playing" mode automatically goes to the next track (or folder)
  • "Random" mode chooses a random track in the current folder
  • When playing, returns track position in seconds
  • When a USB is detected, can find first track on USB or load a specific file
  • Can tell you the current path and filename

See the included examples or vmusic.h file for all the public attributes and functions.

VMusic3 vs VMusic2
If anyone has a VMusic2 they can test this on, I'd love to hear how you go. The library was written for firmware version "V2MSC1.0.0".

SPI
The library uses SPI instead of the default UART, so don't forget to change the jumper pin :slight_smile:

NPN Transistor
Also, the VMusic3 5V power should be switched using an NPN Transistor (Eg: BC548). This is only necessary if you don't want to disconnect then reconnect power to the Arduino every time you reset/reupload a sketch.
Collector: Arduino 5V
Base: Arduino Digital IO used to switch the VMusic on.
Emitter: VMusic 5V

Have a read of the vmusic.h and vmusic.cpp files. There's lots of comments explaining everything in there.
I've also included 2 examples in the library to get you started.

Arduino Car Stereo
If you want to see how the library can be used in a more advanced way, here's a link to my Arduino Car Stereo project:

Andrew

Hi,

thank you verry mutch for your work.

I tried to use your library but i do not get it work.

I build a test setup and flashed the serial example.

If i try to play a file, it is freezing util i remove the usb drive.

Can you help me?

Sorry, I haven't tested the library thoroughly.

Perhaps you could try a different USB drive, or a lower MP3 bitrate?

What File Format is the USB formatted in? What brand/Size is the USB?

I've replied to your email. Can you please email me the file you're trying to play?

Hi,

Thanks for your response. I get it to work. It was a problem with the usb drive.
It runs verry well thanks for your work!

That's so cool!

I'd love to see if you put your player in a nice enclosure.