Home Forums Sparkfun MP3 Shield Library Support Forum Converting Library for Seeed Music Shield Reply To: Converting Library for Seeed Music Shield

#1673

Please try out a current version on my https://github.com/mpflaga/Sparkfun-MP3-Player-Shield-Arduino-Library.git

I have extracted some hardware configurable parameters to ./SFEMP3ShieldConfig.h file. Where there are some simple defines to select other than default.

Just un-comment the below defines and select the desired means.

/**
 * SEEEDUINO:
 * Seeduino MP3 Players is supported. However, its DREQ is not connected to a 
 * hard INT(x) pin, hence it MUST be polled. This can be configured below, using
 * USE_MP3_SimpleTimer.
 * When using a Seeeduino MP3 Player shield uncomment the below define of SEEEDUINO
 * Along with USE_MP3_REFILL_MEANS should not be USE_MP3_INTx, unless extra wires.
 */
//#defined SEEEDUINO  // uncomment if using the Seeeduino Music Shield

Along with the following:

//------------------------------------------------------------------------------
/**
 * The selection of DREQ and its refilling method.
 * To enable MP3 Player to use OTHER than default INT0 on D2 for refilling 
 * uncomment the below define of USE_MP3_REFILL_MEANS and set to desired method, 
 * described below. 
 * The default when left commented implements INT0 on D2.
 */
//#define USE_MP3_REFILL_MEANS USE_MP3_INTx

//------------------------------------------------------------------------------
/**
 * Configure the implemented means of Refilling the VS10xx chip
 */
#if defined(USE_MP3_REFILL_MEANS)
#define USE_MP3_INTx        0 // defacto Interrupt on INTx, from DREQ
#define USE_MP3_Polled      1 // simply polled from main loop checks DREQ on period.
#define USE_MP3_Timer1      2 // Interrupt on Timer1, timer IRQ checks DREQ on period.
#define USE_MP3_SimpleTimer 3 // Soft SimpleTimer period, main loop checks DREQ on period. Note this uses 170 more bytes.
#endif

I have tested the various MEANS on my systems, just not on a Seeduio, but it should based on the pin out. Let me know if this works.

Thanks.