I have a V2.0 music shield which fails when initializing the SD card. The output I get is:
ClockF:C000
error: card.init failed
SD error:1
there are no lights lighting up on the music shield, although I can hear the odd click happening through the headphones.
The music shield control button has no effect.
The code is the creatList program from the Wiki, although I have tried others with the same result.
I have tried using an Arduino UNO and Seeedstudio and also three different music shields.
The micro SD card is a Sandisk 2GB, I have tried two different ones, and also another brand, all 2GB.
I have tried formatting to FAT16 and FAT32, on two different computers.
I have reinstalled the software, it is the latest library from the wiki.
Other applications on the Uno and Seeedstudio work fine, I am just having no luck in getting this music shield to work.
There must be something I am missing, and I am almost expecting it to be something quite simple that I have missed!.. or I hope so
If anyone is able to offer a suggestion please do as I am at a loss.
Hi maybe there is something wrong with your library , you can delete your older libraries (Fat16 and Music) and then download this attachment , have a try.
Any questions you can show it with us. Music.rar (77.3 KB)
All is going sweet but the function I am wanting to do is for the arduino / shield to start playing a song, then while playing, do other functions, like flash LEDs and also some PWM output. However once the song starts playing the code pauses until the song finishes. Is there a way to have a song play while simultaenously doing other control work with the arduino?
Thanks
Greg
yes I can get the PWM to work and stay at a certain percentage, but I want to be able to do other things too while a song is playing (like control some LEDs from a timer). Is there any way to start a song then while the song is playing be able to do other code functions. It seems like as long as a song is playing the main code loop pauses until the song finishes. If this is the way it works then I would like to know so I don’t keep trying to find a solution.
Hi , of course you can do other things while playing a song/songs , you need know what pins the Music Shield has been used first , and modify your code(add other functions to your program). Maybe you can show us your program , so we can talk about it .
My pc wont export my program but here is the core part of the sort of code I am trying to do. This should hopefully start the song and flash an LED once a second while the song is playing. But the LED doesn’t start flashing until the song is finished. Is there a way to make the song start and then do other things while the song is still playing? I have tried different pins for the Led but I am pretty sure this is not the problem.
long ledMillis;
long currentMillis;
int ledOn = false;
int ledPin = 2;
MusicPlayer myplayer;
Hi , you can refer to the library of MusicPlayer.cpp , and you can find that when you run the function (myplayer.playSong(“test.mp3”); ), you can’t do anything but wait.The program run in this function and could be released still the song have stoped. So if you want to run a another function while runing myplay.playSong, you need a interrupt funciton.
By the way,the D1 will flash while the song playing, and digital 8 has connected to D1. So you can also connect a external Led to digital 8,and the external Led will flash too while the song playing .