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

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Beomjun Aaron Bae Lab 6

Page history last edited by xinyi xie 9 years, 8 months 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.