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

  • Get control of your email attachments. Connect all your Gmail accounts and in less than 2 minutes, Dokkio will automatically organize your file attachments. You can also connect Dokkio to Drive, Dropbox, and Slack. Sign up for free.

View
 

Gilligan Matt Lab 6

Page history last edited by zahraa@... 4 years, 11 months ago

Part B. Connect And Test Your Decoder

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

It's a high pitched like beep boop booooooop.

 

Part C. Play Some Music!

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?

No - it plays all but the last song. The sd_dir_setup() function checks the name of the files to make sure they end in MP3 or WAV.

 

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. 

Change the

#define mp3_vol 175

to

byte mp3_vol = 175;
void setup() {
     ...Mp3.begin...
     Mp3.volume(EEPROM.read(521));
     ...  
}  
  
void set_mp3_vol(byte new_mp3_vol) {
     mp3_vol = new_mp3_vol;
     Mp3.volume(mp3_vol);
     EEPROM.write(521, mp3_vol);

 

Part D. Pause to Learn About Interrupts

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

 

?????

 

 

What are the pros and cons of using this method?

Interrupts allow you to minimize the code you must execute during each loop and can help when very specific timing is needed (i.e., for an MP3 player). However, because you get less control over when your interrupt function gets called, you have to handle things like debouncing so that you don't count one event as multiple.

 

 

Part D-3  (-0.5)?

Video (-0.5)?

we will reinstate the 1/2 point if you uploads the video, and sends an email to zahraa@stanford.edu letting us know of the update.

 

 

 

 

 

 

 

 

 

Comments (1)

xyyue@... said

at 11:04 am on Aug 15, 2015

GOOD!

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