Learn how to keep your house safe from robberies in a easy way!
Step 1: Introduction:
You know when you go travel, and stays your whole vacation wondering if your house is safe from robberies; and you can’t relax during your free time? Then your problem is solved! This prototype is a big scale of what would be a garage door. This could be implanted in every single accomodation, regardless of size.
Step 2: Materials
To do this, here is what you need:
- Arduino Uno board
- A breadboard
- Jumper wires
- A distance sensor
- A buzzer
- A computer with the Arduino app installed
- A specific code (you will be able to see it later on)
- A 10K resistor
- A USB cabe (comes with the arduino)
Step 3: Step 3 - the Breadboard
Step 3.1 - First of all, you will separate all of your components. This it will make the process of building the prototype much more easy and organized.
Step 3.2 - Insert the distance sensor in the breadboard and then connect it to the wires. Do the same thing with the button and the buzzer (Observation: there is no correct order to plug the components, but I would recommend you to start with the sensor, since it is the most important part of the engine.)
Step 3.3 - At the end it should look like this:
Step 4: Step 4 - the Code
Step 2.1 - For the code, the first thing you should do is to open a new file in the arduino app and copy this code:
Step 2.2 - Afterwards, check out if EVERY COMPONENT is on the right spot of the breadboard.
Example: const int buzzPin = 2;
Step 2.3 - This code base is a prototype. It is designed so that every time something that is further than 35 centimeters it will send a sign to the computer and it will buzz. After you take the measures, you will have to recode the part in order to make the sensor be hidden but still working.
Example: From: // Calculating the distance distance= duration*0.034/2;
To: // Calculating the distance distance= duration*0.034/2;
Observation: Once you press the button, the sensor will stop working for 10 seconds.
Step 5: Final Version:
Remember! This is just a prototype. You can do it and use it for many other things! Be creative, and most imporntantly, be safe!