Hi Salman, thanks for the reply.
It’s very basic, just added the Ethernet2.h library to see if I can still get the mp3 to play, but it comes back with the error, have you changed the pin address etc and can’t find the mp3 file.
Haven’t got a connection diagram but attached a picture of the “stack”.
I’m programming a Crestron system which needs to play certain mp3 tracks at certain commands. With another sketch, I’ve been able to send communication between a Crestron processor and the Arduino successfully.
Will I have to change the SS port number? Again, Arduino newbie - please be patient!!
Many thanks for any help!!
/*
playWithName.ino
Example sketch for MusicShield 2.0
Copyright (c) 2012 seeed technology inc.
Website : www.seeed.cc
Author : Jack Shao ([email protected])
Create Time: Mar 2014
Change Log :
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <SD.h>
#include <SPI.h>
#include <MusicPlayer.h>
#include <Ethernet2.h>
void setup(void) {
SERIAL.begin(9600);
player.begin(); //will initialize the hardware and set default mode to be normal.
player.setPlayMode(PM_REPEAT_ONE); //set mode to repeat playing a song
player.playOne(“What a Difference a Day Made.mp3”); //play a song with its name
}
void loop(void) {
player.play(); //do some leisurely job
}