| 
  • 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
 

Lab Report 67

Page history last edited by insunj@... 9 years, 4 months ago

Part C. Play Some Music!

How would you alter the code to play a second song? How does it keep from playing the text file?

int songCounter =0;// create counter before the for loop

songCounter++;// after checking the file is mp3 file

if(soungCounter==2) mp3_play(&dataFile); // play the second song.

 

It keeps from playing text file by checking the file format i.e. ".txt, .mp3, ..." if it is mp3 or wav it will be recognized as sound file

 

Change the code to save the current volume setting in your EEPROM and fetch and set that value during initialization.

/*below code to save the volume setting*/

EEPROM_writeAnything(0, mp3_vol); //mp3_vol being the volume var

/*below code to retrieve the volume setting and assign*/

EEPROM_readAnything(0, mp3_vol); //mp3_vol being the volume var

Mp3.volume(mp3_vol);

 

Part D. Pause to Learn About Interrupts

 

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

 

 

Comments (0)

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