I think I was using the NewSoftSerial library. I downloaded it, and pasted it into the /library/ folder at my arduino location. Is that all I had to do?
I have also since tried it without the stream versions, and still the same error.
I have been told that I may have to check the instantiation? I'm not sure what this is, as I only saw it online in relation to the ump3 device.
When attaching my uno to the rmp3, am I correct in just lining up all the pins and attaching? The activity light flashes for a brief moment on the rmp3, then just goes off, and Windows makes the "hardware plugged in" sound, then the removed sound, while the uno is just loop playing the blink programme that I loaded onto it.
@jennyc: Make sure you delete any other versions of NewSoftSerial from your /libraries/ folder (I assume that is what you meant - if not, you need to use that folder instead). Then use this version of NewSoftSerial:
The start-up sounds right. Activity LED should flash briefly, then turn off. Just make sure that the controller board (Uno) is not connected to the computer when you attach the rMP3. After attaching, plug the rig into your computer.
I finally have got it compiled using version 11 of the new software serial. I exported it to my arduino, but cant hear anything. Not sure why, I have the name of the song correct, and its location on the SD card. I think It may be a connection issue between the uno board and the rmp3
Which seems to be on the rmp3 now, just nothing coming out of the headphones. I still have it plugged into my laptop for power just now.
The serial leds on the uno don't seem to be flashing either. I assume that with that code, the mp3 should just play on loop?
I have the mp3 called gold.mp3 on the root and in a subfoler called /mp3/gold.mp3 on the card. I renamed the file to gold.mp3, so i guess it is called gold.mp3.mp3, and tried it without the extra extension, and still no joy?
It just hangs at starting mp3. I am correct in having all the pins from the uno jumped to the rmp3? Doing this wont interfere with the two boards talking?
Is it just those to pins that need to be soldered down? Or am I ok to have all of them soldered to the same pin on the uno board?
I don't have access to my soldering iron at the moment, will be back with it tomorrow. I will double check 6&7 ?and the rest? of the pins, and will let you know how it works from there.
Yeah, just need to make sure 5V, Ground (GND), and pins 6 and 7 are well soldered. Those are the only pins that are used. If you have the pins soldered, it's just as good - just more work.
Away off to read about using the getspectrumanalyser() to get the rmp3 giving the arduino a value, so that an output can be created depending on the value. That sound about right?
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?