Laser Tripwire Triggering Piezo Buzzer

So, what i would like to do is create a Laser Tripwire System with Arduino. I want to create one that will trigger the piezo buzzer for a certain amount of time, instead of just activating the buzzer for the duration that the beam is broken. I am okay at soldering, but i dont have an arduino yet, and i have never tried programming in it. The simpler the better.

P.S. i would love to include a camera that captures a picture when the beam is broken, but the basic setup described above would be lovely too.

thanks.

here is basically what i want to do, i just want to control it with Arduino

So and what's your question? If you need help building such a thing, use Google, there are tons of projects doing exactly this. For example - picked randomly out of the multitude - this one: http://www.instructables.com/id/Another-Arduino-Laser-Tripwire/

Korman

I get how to do this project, and i did look at almost all the Intructables using the Arduino System, but how would i change the arduino commands/coding so that the buzzer stays on for a certain amount of time once the beam is broken, instead of just beeping when the beam is broken.
In the code this is defined as the Arduino sending electricity to the pin the piezo buzzer is connected to when the LDR detects a level lower than when the Laser is shining on it. I want to change the coding to send out a continuous output of power to the buzzer for say 15 minutes after the beam is broken, then it can reset itself....

thats what i am aiming at.

Well looking at the code might help. From the aforementioned instructable the code is as follows:

/*

    Jonathan Robson Feb 09.
    Laser tripwire activates a buzzer. adapted from
    http://www.instructables.com/id/Arduino_Laser_Tripwire/ 

*/

int buzzPin = 11; // buzzer connected to digital pin 11

void setup() {
pinMode(buzzPin, OUTPUT); // sets the digital pin as output
}

void loop(){
if(analogRead(0) < 850){ // this number depends on calibration of the photocell
digitalWrite(buzzPin, HIGH); // turns buzzer on
delay(1000); // waits for 1 second
digitalWrite(buzzPin, LOW); // turns buzzer off

} else{
digitalWrite(buzzPin, LOW);
}
}

Just change the delay between turning the buzzer on and off. It is commented "WAITS FOR 1 SECOND" so that should have stood out....Don't take this the wrong way, but if you didn't catch that, maybe you should start with some basics.

Good luck!

Thank you so much.

Yeah i am completely new to Arduino, i have never used one, and i dont have one either, but i wanted to know how to do it before i got one. I actually didnt even look at the code example in that instructable, i was basically just seeing how hard the soldering would be cause i have a crappy iron...and im not very good at it either.