Forum Replies Created
-
AuthorPosts
-
Michael P. FlagaMember
I have a GeeeTech. It has been a while and recall it work straight up, as it is identical pin out as a SparkFun MP3 Shield.
I would suspect that your problem is occurring from some setting between your selected board and the define of MP3_DREQINT that is located in http://mpflaga.github.io/Sparkfun-MP3-Player-Shield-Arduino-Library/_s_f_e_m_p3_shield_config_8h_source.html
Michael P. FlagaMemberYou must move the PS2X_lib folder to your .\Documents\Arduino\libraries\. directory.
Example.
C:\Users\mflaga\Documents\Arduino\libraries\PS2X_lib
This allows the Compiler to find all the information from the library.
I just tested that it compiles on all 1.0.5, 1.0.5r2, 1.5.6.r2 and 1.5.7
Michael P. FlagaMemberI read two symptoms.
1) that when you play a file you get a #2.
2) the later the SDcard won’t initialize.
The first symptom would indicate that you may have gotten past the SDcard initialize, when running the demo. Assuming your were attempting to run MP3Shield_Library_Demo.ino
Note that the native SdFat examples are not aware of the VS1053. Hence the native SdFat examples do not disable the VS1053’s chipselects. Rather they leave them floating. Which can cause the native examples from properly initializing, if the VS1053 floating chipselects float in the wrong way. I always tweak the SdFat examples so that D8 (VS1053-Reset) is LOW, so that the VS1053 won’t interfere with testing the SdCard.
It is also worth testing different SdCards of different make and model.
If #1 is true and the demo did initialize the SdCard and you got a #2 error while attempting to play a file. It is likely not named properly. I originally used the SdCard Example that would dump the directory. However, you can try to use the FilePlayer.ino it will list the directory and allow you enter an index of the file you want to play.
Michael P. FlagaMemberMichael P. FlagaMemberTo the following file
SFEMP3ShieldConfig.h
append the following code to it:
#undef MP3_XCS #undef MP3_XDCS #undef MP3_DREQ #undef MP3_DREQINT #undef MP3_RESET #undef SD_SEL #undef USE_MP3_REFILL_MEANS #define MP3_XCS A3 //Control Chip Select Pin (for accessing SPI Control/Status registers) #define MP3_XDCS A2 //Data Chip Select / BSYNC Pin #define MP3_DREQ A1 //Data Request Pin: Player asks for more data #define MP3_DREQINT //Corresponding INTx for DREQ pin #define MP3_RESET A0 //Reset is active low #define SD_SEL 10 //select pin for SD card #define USE_MP3_REFILL_MEANS USE_MP3_Polled
For a quick test it is simpler to use the #undef to remove any prior pin assignments. And per the schematics/docs I believe the above should work.
Note there DREQ does not land on any IRQ’s, hence the driver needs to run the refill mode as POLLed. Subsequently the MP3_DREQINT is not used.
Michael P. FlagaMemberYour description of the symptom at first is a bit confusing.
The orange and black, sounded you thought they were errors. But really they are just syntax coloring of the Arduino IDE. There are keyword files with special words that are colored. Where the SPI is one, but the others are not. It is only a convenience.
Where I bet the problem you are seeing in the Monitor is as follows:
If you get this error, you likely do not have a sd.begin in the main sketch, See Trouble Shooting Guide! http://mpflaga.github.com/Sparkfun-MP3-Player-Shield-Arduino-Library/#Troubleshooting
If so, I am fairly certain you are seeing a secondary symptom. To the failure of sd.begin.
Note you have replaced
if(!sd.begin(9, SPI_HALF_SPEED)) sd.initErrorHalt();
with
sd.begin(SD_SEL, SPI_HALF_SPEED);
removing the initial detection of SdCard failure and then falling through to a detection for a different problem, when the SdCard is not properly started.
if you replace the one line as mentioned, I suspect you will see the following:
Can't access SD card. Do not reformat. No card, wrong chip select pin, or SPI problem? SD errorCode: 0X1,0X0
Which is self explanatory. See other questions in forum about failed SdCard causes.
Michael P. FlagaMemberI have ran it just fine at 3.3V. I recall adding some #if’s to properly select on the F_CPU. Not sure if that code only available on my Beta Fork. But even older code will simply run at half the SPI, just fine.
Michael P. FlagaMemberhttps://github.com/mpflaga/Sparkfun-MP3-Player-Shield-Arduino-Library is the most recent. It is the beta version.
Please review the documentation’s Trouble shooting section
Michael P. FlagaMemberFirst problem is that both the BLE and MP3 shield use pins D8 and D9. This needs to be separated. See http://www.youtube.com/watch?v=behMgV3tUr4 as how to bend and reroute pins on a shield. And then correspondingly change the pin definition in the corresponding library.
After that there may be some other conflicts. Next thought about SPI conflicts, appears to be ok, as a quick (not extensive look) at their library shows the SPI is default for the AVR and should be compatible.
They don’t really provide schematics. so hard to tell about much else.
And their demo code is quite extensive. To much so to quickly assess. Where it appears a prinicpal function is to take control of all the AVR’s pins and remote them from the APP. This is would be bad. Where your use would be to have a remote APP control this libraries functions and not the pins themselves.
Michael P. FlagaMemberSee your question and response to your posting on http://stackoverflow.com/questions/21896281/conecting-open-collector-sensor-to-pin-12-miso-using-mp3-shield
Michael P. FlagaMemberYour while isPlaying inside case 6 is blocking, until the track finishes. Hence the keypad is not getting checked. Nor any action on its output can be performed. You may want to check the keypad and return if it was pressed. Or convert the Case 6’s for loop to a state, as not to be blocking.
Michael P. FlagaMemberkey points that may be issue. I suspect you have multiple problems:
1) You need to ensure you are only using ONE of the SdCards, between the SFEMP3 shield and the EtherNet Shield.
2) The EtherNet Shield does not support Interrupts. and in fact is broken when they are enabled. Note the following in the webplayer.ino example:
* \warning
* Need to set the following in the SFEMP3ShieldConfig.h, in order to work.
* \code #define USE_MP3_REFILL_MEANS USE_MP3_Polled \endcode
* as the Ethernet library makes interrupts not possible.along with the following in the loop()
void loop()
{
…MP3player.available();
…
3) not sure what type of packet or how you are sending a packet that starts with “1”. most packets such as Telnet have a header. You may be able to get a way with NetCat.
4) requires the socket connection to be broken between the sending of commands, as to clear the buffer, as not to simply append forever.
note photo’s won’t attach in this forum.
February 5, 2014 at 1:38 pm in reply to: "no matching function for call to begin()" trying to compile the samples #3115Michael P. FlagaMemberI have updated the fork to support the Teensy Core. It uses a different core library as it came out before the Leonardo. The Teensy’s core uses a class usb_serial_class while the Leo uses Serial_ and the none USB devices use a class of HardwareSerial. Hence the library needs to build the corresponding Class to bind to.
I have tested that it compiles on IDE 1.0.5 with Teensy patch applied.
February 4, 2014 at 9:43 pm in reply to: "no matching function for call to begin()" trying to compile the samples #3112Michael P. FlagaMembertry
https://github.com/mpflaga/Arduino-EasyTransfer.git
I have updated this fork to support the 32U4. Note the Leonardo and Teensy both use the 32U4.
This fork compiles on both UNO and Leonardo. Should compile on the Teensy.
February 4, 2014 at 3:44 pm in reply to: "no matching function for call to begin()" trying to compile the samples #3110Michael P. FlagaMemberthe three directories in the package need to be :
.\Arduino\libraries\EasyTransfer
.\Arduino\libraries\EasyTransferI2C
.\Arduino\libraries\EasyTransferVirtualWire
The git package may put them incorrectly into
.\Arduino\libraries\EasyTransfer\EasyTransfer
.\Arduino\libraries\EasyTransfer\EasyTransferI2C
.\Arduino\libraries\EasyTransfer\EasyTransferVirtualWire
Hence your error that it can not find it.
Additionally it will only work on an UNO. Leo’s USB will have issues.
-
AuthorPosts