Until we have the SPI interface for commands working on the rMP3, you will have to use the serial interface to communicate with the rMP3.

In the case with the Arduino Mega, you can't use NewSoftSerial to communicate with the rMP3 on pins 6 and 7 (the default rMP3 serial pins).

A quick fix is to use jumpers from pins 6 and 7 to one of the hardware serial ports on the Arduino Mega.

(In the following picture, we've jumped pin 6 to pin 19 (RX1), and pin 7 to pin 18 (TX1)).

rMP3 on Arduino Mega

And here is an example to test on the Mega:

rMP3Mega-Example.pde
#include <RogueMP3.h>
 
// change this file name and make sure this file exists in the root folder on the SD card
#define SONG "/mysong.mp3"
 
RogueMP3 rmp3(Serial1);
 
void setup()
{
  Serial.begin(9600);
  Serial1.begin(9600);
 
  rmp3.sync();
  rmp3.playfile(SONG);
}
 
void loop()
{
}
  • Bookmark at
  • Bookmark "code:rmp3_on_an_arduino_mega" at del.icio.us
  • Bookmark "code:rmp3_on_an_arduino_mega" at Digg
  • Bookmark "code:rmp3_on_an_arduino_mega" at Google
  • Bookmark "code:rmp3_on_an_arduino_mega" at StumbleUpon
  • Bookmark "code:rmp3_on_an_arduino_mega" at Technorati
  • Bookmark "code:rmp3_on_an_arduino_mega" at Facebook
  • Bookmark "code:rmp3_on_an_arduino_mega" at Twitter
  • Bookmark "code:rmp3_on_an_arduino_mega" at Slashdot
  • Bookmark "code:rmp3_on_an_arduino_mega" at Yahoo! Bookmarks
  • Bookmark "code:rmp3_on_an_arduino_mega" at Furl
  • Bookmark "code:rmp3_on_an_arduino_mega" at Reddit
  • Bookmark "code:rmp3_on_an_arduino_mega" at Ask
  • Bookmark "code:rmp3_on_an_arduino_mega" at BlinkList
  • Bookmark "code:rmp3_on_an_arduino_mega" at blogmarks
  • Bookmark "code:rmp3_on_an_arduino_mega" at Ma.gnolia
  • Bookmark "code:rmp3_on_an_arduino_mega" at Netscape
  • Bookmark "code:rmp3_on_an_arduino_mega" at ppnow
  • Bookmark "code:rmp3_on_an_arduino_mega" at Rojo
  • Bookmark "code:rmp3_on_an_arduino_mega" at Shadows
  • Bookmark "code:rmp3_on_an_arduino_mega" at Simpy
  • Bookmark "code:rmp3_on_an_arduino_mega" at Socializer
  • Bookmark "code:rmp3_on_an_arduino_mega" at Spurl
  • Bookmark "code:rmp3_on_an_arduino_mega" at Tailrank
  • Bookmark "code:rmp3_on_an_arduino_mega" at Live Bookmarks
  • Bookmark "code:rmp3_on_an_arduino_mega" at Wists
  • Bookmark "code:rmp3_on_an_arduino_mega" at Yahoo! Myweb
  • Bookmark "code:rmp3_on_an_arduino_mega" at BobrDobr
  • Bookmark "code:rmp3_on_an_arduino_mega" at Memori
  • Bookmark "code:rmp3_on_an_arduino_mega" at Faves
  • Bookmark "code:rmp3_on_an_arduino_mega" at Favorites
  • Bookmark "code:rmp3_on_an_arduino_mega" at Newsvine
  • Bookmark "code:rmp3_on_an_arduino_mega" at myAOL
  • Bookmark "code:rmp3_on_an_arduino_mega" at Fark
  • Bookmark "code:rmp3_on_an_arduino_mega" at RawSugar
  • Bookmark "code:rmp3_on_an_arduino_mega" at LinkaGoGo
  • Bookmark "code:rmp3_on_an_arduino_mega" at Mister Wong
  • Bookmark "code:rmp3_on_an_arduino_mega" at Wink
  • Bookmark "code:rmp3_on_an_arduino_mega" at BackFlip
  • Bookmark "code:rmp3_on_an_arduino_mega" at Diigo
  • Bookmark "code:rmp3_on_an_arduino_mega" at Segnalo
  • Bookmark "code:rmp3_on_an_arduino_mega" at Netvouz
  • Bookmark "code:rmp3_on_an_arduino_mega" at DropJack
  • Bookmark "code:rmp3_on_an_arduino_mega" at Feed Me Links
  • Bookmark "code:rmp3_on_an_arduino_mega" at funP
  • Bookmark "code:rmp3_on_an_arduino_mega" at HEMiDEMi
code/rmp3_on_an_arduino_mega.txt · Last modified: 2010/03/02 01:46 by bhagman
Valid CSS Recent changes RSS feed Valid XHTML 1.0