| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Want to organize your cloud files? Sign up for a free webinar to see how Dokkio (a new product from PBworks) can help you find, organize, and collaborate on your Drive, Gmail, Dropbox, and Slack files: Weds, May 27 at 2PM Eastern / 11AM Pacific
View
 

MarceloMoreira_Lab6

Page history last edited by Vivien Tsao 6 years, 9 months ago

Stanford University Student: Marcelo Aires Moreira

Stanford ID: 05923879

Press Play: Interactive Device Design

Lab 6

 

 

Part A. Audio Jack

  No questions.

 

Part B. Connect and Test your Decoder

 

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

I hear a 3-note sequence that repeats it self for a long time. The first one is low, the second is high, and the third is also high, but a little lower than the second.

Part C. Play Some Music!

 

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

The song that was in my SD card I do not know the name, but the Lyrics were: “Don’t fall in love with me, everything, …”

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?

Yes, since current_state = dir_play();, the code plays all the songs in the SD card.

The tittles of the songs are managed through the sd_file_open() function, wich uses the arduino’s EEPROM memory to store tittle’s names.

✓ what kind of files does it not open?

Part D. Pause to learn about interrupts

 

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

What are the pros and cons of using this method?

The pros are that, using interrupts, the program does not need to check if a button was press every time it goes through the loop function. The program will just check if the button was press if you actually press the button. So the hardware is the one who is talking to the software in this case, so we make our code faster, avoiding lags/delays.

The cons are that it is a little harder to set up an interrupt instead of just throwing a function inside the loop.

Now, take what you learned to make an interrupt driven pause function for your Barebones MP3 player!

I used it in my Final Project.

 

 

 

 

Comments (1)

Vivien Tsao said

at 11:51 am on Aug 20, 2013

Good.

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