1

This is a basic level lazer alarm project. When anyone crosed or kept their hands on the lazer. buzzer starts working but when they took their hand from lazer light buzzer stops. But i want even after taking hands my buzzer should work for few (15-30) seconds .so please help me by giving idea..

1
  • Please don’t write answers in the comments. It bypasses our quality measures by not having voting (both up and down) available on comments, as well as having other problems detailed on meta. Comments are for clarifying and improving the question; please don’t use them for other purposes. Existing answers-in-comments have been deleted. I notice a proper answer has been given by DragonflyRobotics.
    – Nick Gammon
    Jul 25 at 6:43
0

If you are using a digital buzzer, you can do:

digitalWrite(buzzerPin,HIGH); 
delay(1000);
digitalWrite(buzzerPin,LOW);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.