CameronSteinfeld_Lab6


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

 

Tone # 1 - highest, tone #2 lower, tone #3, lowest. -- this is repeated indefinitely. 

 

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

The first song on the sd card is Absolutely Cukoo.

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?

 

This code, dir_play, will continue to play songs until it reaches the end of a single directory.  Therefore I do not believe that it would continue on to another directory if another directory existed on the sd_card.  The encoder does not read/play the text file because the buffer exists in order to determine the bytes which are to be read.

 

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. 

 

To write the volume of the mp3 to EEPROM without overwriting anything else, you can use the EEPROM.write() function and start it at value 521, because the number of songs

and length of songs take up to 520 on EEPROM. 

 

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

 photo photo_zps855a331c.jpg

 

What are the pros and cons of using this method?

 

The pros of debouncing the button this way is that it will prevent the circuit from detecting false button pushes and allow the user to press the button multiple times without confusing the program.  The downside of this is that by adding in the delay time after the button push, rapid button pushes may cause the program to lag a bit.