Permalink
Browse files

fixed for Arduino Mega use by calling SDfatlib properly. Blame Nathan…

… for bad implentation of SDFatlib

Signed-off-by: Bill Porter <madsci1016@gmail.com>
  • Loading branch information...
1 parent 9dffa6b commit 5da17786b143e86ea67b56b4b385a24fe4deddca Bill Porter committed Feb 11, 2012
Showing with 9 additions and 6 deletions.
  1. +4 −2 ReadME.txt
  2. +3 −2 SFEMP3Shield/SFEMP3Shield.cpp
  3. +1 −1 SFEMP3Shield/SFEMP3Shield.h
  4. +1 −1 SdFat/Sd2PinMap.h
View
6 ReadME.txt
@@ -1,5 +1,5 @@
/******************************************************************
-* Sparkfun Electronics MP3 Shield Library v0.4
+* Sparkfun Electronics MP3 Shield Library v0.6
* details and example sketch:
* http://www.billporter.info/?p=1270
*
@@ -9,7 +9,7 @@
*
* Contributers:
* Most code from SFE head guru Nathan
-* But for making this pretty I think he owes me a beer now.
+* But for making this pretty I think he owes me a beer now.
*
* Lib version history
* 0.1 made into library, external interrupt driven.
@@ -18,6 +18,8 @@
* 0.4 added functions to cancel and resume external interrupt
* in case something else is on the SPI bus
* 0.5 added skipTo() and related functions to skip around in track
+* 0.6 fixed for Arduino Mega use by calling SDfatlib properly.
+* Blame Nathan for bad implentation of SDFatlib
*
*
*
View
5 SFEMP3Shield/SFEMP3Shield.cpp
@@ -32,9 +32,10 @@ uint8_t SFEMP3Shield::begin(){
//Setup SD card interface
//Pin 10 must be set as an output for the SD communication to work.
- pinMode(10, OUTPUT);
+ //pinMode(10, OUTPUT);
+ //pinMode(53, OUTPUT);
//Initialize the SD card and configure the I/O pins.
- if (!card.init(SPI_FULL_SPEED)) return 1; // Serial.println("Error: Card init");
+ if (!card.init(SPI_FULL_SPEED, SD_SEL)) return 1; // Serial.println("Error: Card init");
//Initialize a volume on the SD card.
if (!volume.init(&card)) return 2; //Serial.println("Error: Volume ini");
//Open the root directory in the volume.
View
2 SFEMP3Shield/SFEMP3Shield.h
@@ -61,7 +61,7 @@ static uint8_t mp3DataBuffer[32];
#define MP3_XDCS 7 //Data Chip Select / BSYNC Pin
#define MP3_DREQ 2 //Data Request Pin: Player asks for more data
#define MP3_RESET 8 //Reset is active low
-#define SD_SEL 10 //select pin for SD card
+#define SD_SEL 9 //select pin for SD card
//VS10xx SCI Registers
#define SCI_MODE 0x00
View
2 SdFat/Sd2PinMap.h
@@ -281,7 +281,7 @@ uint8_t const SDA_PIN = 18; // C4
uint8_t const SCL_PIN = 19; // C5
// SPI port
-uint8_t const SS_PIN = 9; // B2
+uint8_t const SS_PIN = 10; // B2
uint8_t const MOSI_PIN = 11; // B3
uint8_t const MISO_PIN = 12; // B4
uint8_t const SCK_PIN = 13; // B5

0 comments on commit 5da1778

Please sign in to comment.