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.