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


Lab 6 MC

Page history last edited by Benjamin Tee 7 years, 11 months ago

Barebones MP3 Player


Describe the tone pattern you hear (ie, high or low?  how long? etc)

It's 3 tones with a delay between them of 1 second. It's a low-frequency tone, then a medium frequency and a high frequency tone.

Tell a member of the teaching team what your song is (or better yet, play it for us). If you don't know the name, just decipher some of the lyrics.

"What a little bit of love can do" Jeff Bridges


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?

It's in the DIR_PLAY state so it will play all songs in directory until is the last song, when it is going to go into Pause state. In the Utilities.ino is the sd_dir_setup function which checks if the file has the .mp3 type of file.


Change the 'song' code to save the current volume setting in your EEPROM and 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. 



int volumenn = 0;


sci_write(SCI_VOL, EEPROM.read((max_num_songs*max_name_len)+1));




Song code



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

What are the pros and cons of using this method?

The pro is that there is almost guaranteed a good read from the button, the con is that this add delays to the performance of the code.


Comments (0)

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