Music Shield

Ardiuno Compatible shields

Moderators: lily.li, violet

Post Reply
silvereagle201
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Thu Oct 18, 2012 4:27 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: music shield

Music Shield

Post by silvereagle201 » Tue Oct 30, 2012 1:30 pm

I got the Music Shield working by using Demo1, as you suggested. Is it possible to play songs by name? This Demo only plays all songs in succession. Also, are there any free pin for other usage when the shield is being used??

User avatar
Jacket Chen
Staff
Staff
Posts: 659
Joined: Thu Jun 21, 2012 4:25 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino Shields
Location: China

Re: Music Shield

Post by Jacket Chen » Tue Oct 30, 2012 3:58 pm

silvereagle201 wrote: Also, are there any free pin for other usage when the shield is being used??
Hi
You can see those codes,we have defined some pins.
/*demo*/

#ifndef PINS_CONFIG_H
#define PINS_CONFIG_H

#include <avr/io.h>
#include <arduino.h>
////////////////////For some control pins//////////////////////////
#define ROTARY_ANGLE_SENSOR A4
#define BUTTON 7
////////////////////////for MMC////////////////////////////////////
#define SD_CS_PIN 10 //SD card select pin linked to pin10 of MCU

///////////////////////for vs10xx///////////////////////////////////
#define VS_XRESET A0
#define VS_DREQ A1
#define VS_XDCS A2
#define VS_XCS A3

/////////////////////for keys//////////////////////////////////////
#define KEY_VD 7
#define KEY_BK 6
#define KEY_PS 5
#define KEY_NT 4
#define KEY_VU 3

//////////////////for Green LED///////////////////////////////////////
#define GREEN_LED 8
#define GREEN_LED_ON() digitalWrite(GREEN_LED, HIGH)
#define GREEN_LED_OFF() digitalWrite(GREEN_LED, LOW)

/*demo end*/
Hope they would be helpful to you.
Love little, love long.

User avatar
Jacket Chen
Staff
Staff
Posts: 659
Joined: Thu Jun 21, 2012 4:25 pm
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino Shields
Location: China

Re: Music Shield

Post by Jacket Chen » Tue Oct 30, 2012 3:59 pm

silvereagle201 wrote:I got the Music Shield working by using Demo1, as you suggested. Is it possible to play songs by name? This Demo only plays all songs in succession.
Hi,Dear.
Following is the demo, and you need to modify it.
/*demo*/
void loop()
{
myplayer.setPlayMode(MODE_REPEAT_ONE);//set mode to repeat to play a song
myplayer.playSong("Best.MP3");//play a song named with Best, Mp3
while(1);//If the mode is normal, it will stop when it finished playing all the songs in the playlist
}

/*demo end*/
If the name of your song is "XXX",the red line of the demo you need to modify. And be care of the type of song,MP3 or wma.
Love little, love long.

Post Reply