In this Tutorial, We are Going To Make Laser Tripwire Home Alarm System
The need for a security system has arisen as a result of rising crime rates. So, Having a security system gives you the safety and security you need to lead a peaceful life, whether it be at your house, place of employment, or apartment. All fields of life are gradually introducing new technologies. However, modern tools and devices need to be improved and changed to improve security. Thus in this article, we will make a modern Laser Tripwire Home Alarm System.
You might have played with laser toy guns in your childhood, or you may have seen the laser in various science fiction movies. And, you might have also seen the laser maze challenge game, in which when a person touches the laser, an alarm produces a sound. The same things happen in the laser tripwire alarms.
Hardware Components
Working Explanation
First, we define the Arduino pins that are connected to the buzzer and LED. Also, we name those pins as buzzerPin and Led
In the void setup, we first initialize the serial monitor. After that, we declare both led and buzzer pins as output.
In the void loop, we provide the function analogRead(A0) to read the values coming from pin A0 which is connected to the LDR. Thus, we store that value in the integer variable sensor value. Then we give a while condition to provide a buzzer to make a sound when the value exceeds 800. Also, use the digitalWrite function to make LED high.
This Project is sponsored by PCBWay. They have an open-source community, people can share their design projects with each other. Moreover, every time people place an order for your board, PCBWay will donate 10% of the cost of PCB to you, for your contribution to the Open Source Community.