• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Browse and search Google Drive and Gmail attachments (plus Dropbox and Slack files) with a unified tool for working with your cloud files. Try Dokkio (from the makers of PBworks) for free. Now available on the web, Mac, Windows, and as a Chrome extension!



Page history last edited by Vivien Tsao 7 years, 11 months ago

                                               Stanford University_Weld Lucas Cunha


Lab Report 6:


-Part B:


=> Describe the tone pattern you hear (i.e., high or low, how long, etc.).

     I can hear some different tones that last for approximately 1 second and stop for another second. It is very low.

- Part C:

=> Tell a member of the teaching team what your song is (or better yet, play it for us).


=> Does this code play all the songs in all the directories of the SD card? If not, which songs does it play? How does it keep from playing the text file?

     The code is set up to open the microSD card’s root directory, and play all the songs within it.

=> Change the Song (or Simple_MP3_V2) program to save the current volume setting in yourEEPROM, then fetch and set that value during initialization.

 Note that the first max_num_songs *max_name_len (in this case, 520) bytes of the EEPROM are used to store file names, so don't overwrite those. 

- Part D:

=> Draw us a quick sketch of what your circuit looks like.




=> What are the pros and cons of using this method?

       About the interrupts and debouncing: 

       - Pros: You don't have to waste time in your code, both the interrupts and the debouncing in this method has a smart way to check if the button was pressed and released or if something

       needs to be done, instead of check every time you execute the code in your loop. The debouncing makes the button work in a more efficint way and the become more reliable this way,

       and we also can configure the time we would like it to wait.   

       - Cons: If wrong configured the debouncing can be turned into blocking code, and there are a limited number of interrupts to be used.

=> Now, take what you learned to make an interrupt driven pause function for your Barebones MP3 player!

     I configured the interrupt in the following way:

     " attachInterrupt(0, pause, RISING);"


     And the "pause()" function is:

     "void pause(){

            while (state_button == HIGH){}

            if(current_state == DIR_PLAY){

                   current_state =  PAUSED;


            else if (current_state == PAUSED){

                   current_state = DIR_PLAY;



==> This is a link for my mp3 player working:     http://www.youtube.com/watch?v=c8x9K6i-auo 

Comments (1)

Vivien Tsao said

at 4:00 pm on Aug 14, 2013

Good job!

You don't have permission to comment on this page.