As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Tuesday, June 11, 2013

Dan | Stephen//Music and Shields and Problems and Stuff

Part of the solution to our problem is that we want audio output. We were successful in creating "beeps and boops" using the Arduino and a Piezzo speaker but to gain more attention from our targeted audience it is important to us to use more developed sounds.

The first music shield that we worked with was one from Seeed studios which we ran into many problems with. It came put together fully, but did not come with compatible libraries with the UNO version of the Arduino. After many hours of searching for help, trial and error, and no success we found a different music shield we thought might work...

It got lost in the mail....

We worked on making changes to this, but were unsuccessful in our attempts and in our attempts to reach out to people that may know on message boards. (This is an un adjusted version)



Here is some process of the first shield we worked with.




We then moved on to trying to get .wav files that could be small enough to actually exist on the Arduino itself. We were able to get some basic small .wav files to play from a speaker and store in the Arduino but we still could not compress the sounds we actually wanted to fit in the small memore so we got a SD card shield.

We still have trouble compressing the files into 8bit audio .wav files. Before we got them to work properly they could begin to play and then make awful noises, but in the end got them to work. We downloaded the sound from http://www.freesound.org/people/LocalTalkRadio/sounds/118443/





Our code looked like this: 


/*
 SimpleSDAudio absolute minimum example, plays file EXAMPLE.AFM from root folder of SD card (CS on pin 4)
 through speaker/amplifier at pin 9 for ATmega328 / pin 44 for ATmega1280/2560.
 */
#include <SimpleSDAudio.h>
void setup()
  // SdPlay.setSDCSPin(10); // Enable if your SD card CS-Pin is not at Pin 4... 
  SdPlay.init(SSDA_MODE_FULLRATE | SSDA_MODE_MONO | SSDA_MODE_AUTOWORKER);
  SdPlay.setFile("EXAMPLE.AFM"); 
  SdPlay.play();
}

void loop(void) {
}

No comments:

Post a Comment