Laser+Harp

Team: Adam Sindlinger Tori Sindlingermedia type="custom" key="10700042" align="right"

Materials: 9-26-11 > Process: 9-27-11
 * 5 lasers
 * Wood-frame
 * Photocells
 * Piezo speaker / midi jack
 * 10k Ω resistor
 * 100 Ω resistor
 * we need a 28" by 10" sheet board to mount the lasers
 * Connect photocells to analog pin 4
 * Use a 10kΩ resistor to connect photocell to negative
 * Use a wire to negative to ground
 * Connect piezo speaker to negative
 * Use 100Ω resistor into digital pin 5
 * Connected photocell 2 to analog pin 3
 * Connected photocell 3 to analog pin 2
 * Connected photocell 4 to analog pin 1
 * Connected photocell 5 to analog pin 0

Progress: 9-28-11 Today we worked on troubleshooting the photocell. It was first in digital and needs to be on analog. We also worked on fixing the programming code because we could not get it to beep with the right amount of light. We also were troubleshooting the duration of the light.

9-30-11 Fixed the delay and programming also we got it to beep with the right amount of light. We added 4 more photocell/resistor combos.

10-3-11 Got 3 of the photocells to work and changed the program allowing all to work. Switched the program to make it so it runs when you cover the photocell it makes the sound.

Codes:

Code 1:

void setup { Serial.begin(9600); pinMode (2, INPUT); }

void loop { int Light = analogRead(5); Serial.println(Light, DEC); if (Light > 550) { tone(5, 262, 250);

}

} This was to run one photocell and the speaker.

Code 2:

const int threshold = 550; //minimum reading of the sensors that generates a note//

notes to play, corresponding to the 3 sensors: int notes[] = { NOTE_A4, NOTE_B4,NOTE_C3 };

void setup {

}

void loop { for (int thisSensor = 1; thisSensor < 3; thisSensor++) { //get a sensor reading:// //int sensorReading = analogRead(thisSensor);//

if the sensor is pressed hard enough: if (sensorReading > threshold) { // play the note corresponding to this sensor: tone(8, notes[thisSensor], 20); } }  Serial.println; } This is the code we altered to get our final code.

Code 3: const int threshold = 550;

int notes[] = { NOTE_C5, NOTE_G4, NOTE_F4, NOTE_E4, NOTE_D4};

void setup {

}

void loop { for (int thisSensor = 0; thisSensor < 5; thisSensor++) { int sensorReading = analogRead(thisSensor); if (sensorReading < threshold) { tone(5, notes[thisSensor], 20); } }  Serial.println; } This is the complete code.

10-20-11 We have been constructing the frame and getting the photocells up and taped up to the frame....now we are troubleshooting on how to get the laser to stay standing straight up while at the same time getting them to hit the photocells. Our plan to accomplish this was to get a piece of wood (28"x10") and drill holes to hold the laser pointers into place.

10-21-11 We took the wood we were given and began to take measurements on how far each photocell is from the sides of the frame, and the diameter of the laser pointer (Diameter = 3/8"). After taking measurements we marked the board to the position each laser needs to be positioned.