Forum Replies Created

Viewing 15 posts - 31 through 45 (of 204 total)
  • Author
    Posts
  • in reply to: Host running less than 16MHz #3306

    Ask your self why is it not refilling on its own.

    Because the Refill() is not getting executed. What executes the refill(). It is executed once after any command. Hence it plays when sending Volume or constantly holding a button, which is sending a command. But more importantly the refill() is executed when the DREQ is asserted indicating more is needed. Typically the DREQ is connected to an INT pin and its ISR calls the refill(). Or it is polled when configured with USE_MP3_REFILL_MEANS = USE_MP3_Polled.

    Either way the refill is not getting automatically done. Likely your INT pin is not what you think it is on the 1284p. The pins_arduino.h is a bit difficult to read and there should be a \variants directory in your hardware directory

    I often just make quick sketch for each INT and poke them as to see what is what for new boards.

    in reply to: Not working with battery #3303

    tough to debug the circuit. In short it should work. I run mine through Battery often. I would recommend getting a volt meter out and figure out what does not have voltage.

    I usually run battery holder with a DC jack. I wonder if you are directly connecting the wire to the header. This may omit the flow through regulators.

    in reply to: Host running less than 16MHz #3297

    Note that the SdFat Lib and SFEMP3 lib both set the SPI Mode and Rate just prior to each transfer. This will over write anything you configure. Since each library/driver has a different maximum rate. In early days of SFEMP3 it was configured just at ::begin. But the SdCard changes it to 8Mg and the VS1053 limited to 6 Mg for read back.

    It is good practice to not rely on the assumption the SPI is the way you left it. Some other driver may have changed it. Such as adding a SPI Temp Probe or other. Hence your driver should set it prior to enabling the Chip Select.

    in reply to: Skipping More than 65 Seconds #3290

    There are two issue here of concern.

    1) the VS1053 device is a streaming device with only 2K of memory.

    2) and more important the Arduino’s SDfat library does not give access to absolute file pointer, but only the offsets from current location. And it appears the SdFat Libary is limited to 32 bit math. Not sufficient for a pointer of 4G Sdcard limitation.

    The skip function uses

    track.seekCur((uint32_t(timecode/1000 * Mp3ReadWRAM(para_byteRate))

    and the skipto uses

    track.seekSet(((timecode * Mp3ReadWRAM(para_byteRate))/1000) + start_of_music)

    both a seekSet and seekCur only accept a uint32_t

    That said most MP3 files want jumps to and from boundaries of the packet frame data. Jumping to the middle of a frame can cause problems, with out the header it is bunch of garbage. Neither the Arduino or the VS1053 can hold the whole file in memory. Making it awkward, as to do it right one must read the VS1053 current frame status, it will return info as to the prior and next frames, as to be properly calculated. However, it turns out that the many different formats supported by the VS1053 each have there own unique format and method of handling this information. Hence the short cut of hard jumping the offset of bytes and muting a few milliseconds as not hear the garbage until a new frame occurs.

    Sorry, due to the 32bit limitation jumping is the only method that comes to mind.

    FYI – I have played 2G files and not sure how it works, but it can keep going. Likely the SdCard keeps track of the file pointer, being streamed into the SPI of the Arduino.

    Note that SdFat Library caches 500 byte chunks. Hence it takes a bit of SRAM. And needs a bit of time to grab next 500. But other Interrupts will take precedence.

    in reply to: I want run "MP3player.playTrack(1);" from Processing #3260

    The examples provide do not support Processing or Firmata. That said there nothing stopping anyone from simply combining them. It would be simple enough to create a function in response to a Firmate command to play a Track or stop it, etc… Similar can be done with several Arduino to/from Processing libraries.

    in reply to: MP3 trigger not working. #3256

    I am bit unclear as to which files you are exactly referring to. I assume you mean https://github.com/sparkfun/MP3_Player_Shield/blob/master/firmware/MP3_GPIO_Trigger/MP3_GPIO_Trigger.ino fails. I can not guess “example file player that came with the shield” you are referring to.

    I have seen some internal pull ups not work on some ATmega328p’s. MP3_GPIO_Trigger.ino has a print to indicate if which trigger occurred. As to confirm if the problem is the input. Or something else.

    You may want to try https://github.com/mpflaga/Sparkfun-MP3-Player-Shield-Arduino-Library/blob/master/SFEMP3Shield/Examples/MP3ButtonPlayer2/MP3ButtonPlayer2.ino

     

    in reply to: Play Folders? #3254

    yes,

    you can change directory with

    sd.chdir(“/path”);

    in reply to: build a mp3 sampler with display what do i need #3250

    yuk the above post got HTML junk in it. Here is what it was

    if (MP3player.ADMixerLoad(“admxster.053”) == 0) {
    MP3player.ADMixerVol(-3);
    }

    Also note the above example listens IN and plays out, and plays a Beep for every key pressed. I was but did not finish a playing a MIDI beep that did not need a file.

     

    in reply to: build a mp3 sampler with display what do i need #3249

    Yes, this is possible.

    You may want to refer to the following link: https://github.com/mpflaga/Arduino-BioFeedBack/blob/master/Examples/MP3Player/MP3Player.ino as it loads the audio mixer plugin, which takes Audio IN and plays it out the output.
    <table class=”highlight tab-size-8 js-file-line-container”>
    <tbody>
    <tr>
    <td class=”blob-code js-file-line” id=”LC77″><span class=”pl-k”>if</span> (MP3player.<span class=”pl-s3″>ADMixerLoad</span>(<span class=”pl-s1″><span class=”pl-pds”>”</span>admxster.053<span class=”pl-pds”>”</span></span>) == <span class=”pl-c1″>0</span>) {</td>
    </tr>
    <tr>
    <td class=”blob-code js-file-line” id=”LC78″>MP3player.<span class=”pl-s3″>ADMixerVol</span>(-<span class=”pl-c1″>3</span>);</td>
    </tr>
    <tr>
    <td class=”blob-code js-file-line” id=”LC79″>}</td>
    </tr>
    </tbody>
    </table>
    This was built on a Mega2560 custom board that I made.  But was basics apply to any board and shield.

    As for inputs you will need additional inputs, more than a UNO. You could either use a Mega for the buttons. Or use extra chip. such as http://www.arduino.cc/en/Tutorial/ShiftIn or https://www.sparkfun.com/products/11733

    I would also suggest using Capacitive Touch input. https://www.sparkfun.com/products/9695. with a bit of Copper foil tape under the plastic with a wire to the Cap Sens. I have been using it very successfully. Removes any mechanical tooling and parts to buy. https://learn.sparkfun.com/tutorials/mpr121-hookup-guide?_ga=1.45861219.674176085.1386568569

    in reply to: mp3 Shield without IDE? #3246

    not sure without seeing your code.

    I have several examples posted on https://gist.github.com/mpflaga used by followers.

    MP3random.ino at https://gist.github.com/mpflaga/5800889 has no serial defined. just randomly plays tracks. Perhaps you can try this, to verify things.

    in reply to: mp3 Shield without IDE? #3244

    The IDE is only needed for developing firmware and uploading it to the Arduino.

    Where the Demo does require a Serial Port interface to interact with the Arduino. The IDE’s built in Serial Monitor can do this. Or any other Serial Terminal Emulator. Such as HyperTerm or Putty, etc…

    Where MP3ButtonPlayer2.ino does not require Serial interface, as IO pins trigger the player.

    in reply to: Bakelite Phone and MP3 shield #3240

    Please note there are three overloaded functions for volume

    void SFEMP3Shield::setVolume(uint8_t leftchannel, uint8_t rightchannel);
    void SFEMP3Shield::setVolume(uint16_t (leftchannel<<8)+rightchannel);
    void SFEMP3Shield::setVolume(uint8_t ValueToBoth);

    Described in the documentation, that can be found at

    Additionally the following can impact how the VS1053 output the signal.

    void SFEMP3Shield::setMonoMode (uint16_t);
    void SFEMP3Shield::setDifferentialOutput (uint16_t);

    Note that stock SFEMP3Shield library does not include an example called “trigger”. Only MP3Shield_Library_Demo.ino and FilePlayer.ino employ SetMonoMode and SetDifferentialOutput by use of a Menu.

    Where all examples except that of WebPlayer.ino control volume via the use of

    void SFEMP3Shield::setVolume (uint8_t leftchannel, uint8_t rightchannel)

     

     

    in reply to: Very slow starting mp3 files… #3220

    about the later; is any of the beginning of the audio file skipped? (are the first expected notes heard?)

    in reply to: library for geeetech VS1053 module and Arduino #3216

    Yes, the Geeetech work with the AdaF.

    I never got around to implementing Recording, as the SFE card does not have an input. There is a fork with recording at https://github.com/miguelmoreto/Sparkfun-MP3-Player-Shield-Arduino-Library

Viewing 15 posts - 31 through 45 (of 204 total)