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

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Beomjun Aaron Bae Lab 6

Page history last edited by xinyi xie 6 years, 1 month ago

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

     - there are three one-second-long tones that are being played over and over again with a second intervals. 

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

     - The song is "Absolutely Cuckoo" by Magnetic Field

     - Next is "Baba Yetu" by Christopher Tin

     - Next is "Adiemus" by Adiemus 

     - Next is "What a Wonderful World" by Israel Kamakawiwo'ole

    

C. 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?

     - Yes, it plays all the songs in the directory of the SD card. 

     - However it is only able to play the files with the extension .mp3 or .wav

C. Change the Song (or Simple_MP3_V2) program to save the current volume setting in your EEPROM, 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. 

  Mp3.begin(mp3_cs, mp3_dcs, mp3_rst, mp3_dreq);

  int temp = EEPROM.read(max_num_songs * max_name_len + 1);

  Mp3.volume(temp);

  EEPROM.write(temp);

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


When you press the button it changes the boolean value, but sometimes when you press it multiple times in short intervals, it could change the state more than once per press. You must debounce in order to prevent this from happening.

D. What are the pros and cons of using this method?

     - Pro: It improves the accuracy of the user input

     - Con: It slows the code down a bit

 

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


 

 

 

 

Comments (1)

xinyi xie said

at 7:39 pm on Aug 12, 2014

Great job!

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