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

Lab Report 67

Page history last edited by insunj@... 12 years, 11 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.