Hi
edit::
Sorry, I have just looked back and seen that I pasted the wrong code, I just pasted yours, oops.
I was using your code as a base for mine.
I think I have got to a point where it should be analysing the code, but I am not sure as to what each part of your original code actually does. I have tried to edit it with the code to play from the folder /mp3/ and the audio is not playing, but have had a version where it did only play my song gold.mp3.
From what I can tell from your code, mine should now be analysing for 3 different bands, and sending it back to the arduino. My problem is now, I am not sure how to change this from the lcd output, to just have a different arduino output turned "on" when each frequency returned.
#include <SoftwareSerial.h>
#include <RogueMP3.h>
#include <RogueSD.h>
SoftwareSerial rmp3_s(6, 7);
RogueMP3 rmp3(rmp3_s);
RogueSD filecommands(rmp3_s);
uint16_t bandfreqs[] = { 120, 2000, 20000 };
uint16_t numfiles = 0;
#define MP3PATH "/mp3/"
// you need to put the two double quotes ("") in the middle below,
// because the Arduino IDE looks for unclosed comments.
#define MP3FILTER "/mp3/""*.mp3"
void doFREQSpec(void)
{
// prepare for up to 3 bands
uint8_t v[3];
rmp3.getspectrumanalyzer(v);
}
void setup(void)
{
Serial.begin(9600);
Serial.println("Started");
Serial.println("Starting sync");
rmp3.sync();
filecommands.sync();
Serial.println("Done sync");
}
void playTrack(void)
{
char mp3path[128];
// ...
rmp3.playfile(mp3path);
rmp3.setspectrumanalyzer(bandfreqs, 10);
Serial.println("Playing");
}
void loop(void)
{
}
Currently my code is stuck on the syncing. I will keep trying to get this working with the folder, but as a failsafe, I have it working with a single track.
Is there a specific part of the documentation that I can read, or a direction you can point me in on how to translate this back to an arduino output?
Thanks
Jenny