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


Electrical Engineering Lab 6

Page history last edited by Vivien Tsao 7 years, 2 months ago

Scott Niman



Electrical Engineering Lab 6

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

High tone, then a medium tone, then a low tone repeatedly.

Tell a member of the teaching team what your song is (or better yet, play it for us).

Absolutely Cuckoo by Magnetic Fields.

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?

I believe that all of the songs on the directory being called will be played and that if there are more directories, for those to also be played, it would require the individual directories to be called and read. It doesn’t play the text file because the buffer is selecting the bytes to be read and played.

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. 

There is a function called EEPROM.write(); that can be used and to avoid overwriting the file names, start saving the values after 520 (the number of bytes needed for the file names).

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

✓ ok

What are the pros and cons of using this method?

Debouncing a button is a very important so that the user cannot inadvertently confuse the microcontroller. The pros are that the button can be pressed many times and the detected delay will keep the program from messing up whereas the cons are that the user can still mess with the program by causing it to lag a little if the button is pressed very quickly.

Comments (0)

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