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

Page history last edited by Jason Gonzalez 12 years, 10 months ago

Part B. Connect And Test Your Decoder

Describe the tone pattern you hear.

 

The tones go from LOW to HIGH to MEDIUM and then repeats.

 

Part C. Play Some Music!

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.

 

This song was really tough to identify at first. It mostly sounded like gibberish, but then my inner child slowly recognized it at the most famous gibberish-speaking person ever, the Swedish Chef!

 

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

 

The code does not have to be modified to play a second song as it already attempts to play all files in the root directory. This if statement checks for the specific file types that we can play, and it makes sure we don't try to play files that we cant, such as a txt file:

 

if ((fn[fnln-3] == 'M' && fn[fnln-2] == 'P' && fn[fnln-1] == '3') ||

  (fn[fnln-3] == 'W' && fn[fnln-2] == 'A' && fn[fnln-1] == 'V')) {

 

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

 

In order to do this, I had to create a new variable at the top of my code that retains the current volume setting. Then, at the end of setup(), I included a line that saves this value to EEPROM:

 

EEPROM.write(999,currentVolume);

 

Then, I changed the volume setting line from the beginning of setup():

 

mp3.volume(EEPROM.read(999));

 

 

 

Comments (0)

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