Blueprint

Arduino security system

We had to make an arduino security system for school so might aswell just put it on blueprint am I right. The project includes a touch sensor, a temperature sensor, a photocel sensor (light sensor), a tilt sensor, a crash sensor, a buzzer and a led. We used the arduino UNO without the breadboard sadly it's the easy one.

Created by martiksimonian27 martiksimonian27

Tier 5

3 views

0 followers

martiksimonian27 martiksimonian27 added to the journal ago

I made the code for the security system

First I started by making a const of every single thing i'm going to use and where I plugged it and set a limit for the temperature and the light. In the void setup I just said if they were inputs or outputs. In the void loop I made an intereger for example 'int temp = analogRead(TempSensor);' which just says the read the value of the temperate sensor and name the value that you get 'temp' and I did that for the rest of the sensors, and I printed the values of the temperature the lightlevel and if it was tilted or not. After I made the if statements and said that if the tilt is low then the alarm has to go on, I did the same for the crash sensor. The alarm can only be disabled if you press of the touch sensor. The alarm could also go off if the current temperature was higher then the limit set. About the same thing happens but for the light sensor if the current amount of light is higher then the limit then a led goes off.

Here is the hard part, I tried and I tried but I failed, so I had to go to the dark side and asked chatgpt. What I couldn't figure out was how to make the alarm stay on so chatgpt suggested me to make a new const named alarm and use that for the tilt and the crash sensors.

image

image

image

I currently do not have any footage of it actually working but I have lessons on tuesday so I can ask my teacher if I can film it for hackclub. And if you are wondering why I but the journal as 2 hours spent it is because I have 2 hours of class and I used it all.

martiksimonian27 martiksimonian27 started Arduino security system ago

1/21/2026 - I made the code for the security system

First I started by making a const of every single thing i'm going to use and where I plugged it and set a limit for the temperature and the light. In the void setup I just said if they were inputs or outputs. In the void loop I made an intereger for example 'int temp = analogRead(TempSensor);' which just says the read the value of the temperate sensor and name the value that you get 'temp' and I did that for the rest of the sensors, and I printed the values of the temperature the lightlevel and if it was tilted or not. After I made the if statements and said that if the tilt is low then the alarm has to go on, I did the same for the crash sensor. The alarm can only be disabled if you press of the touch sensor. The alarm could also go off if the current temperature was higher then the limit set. About the same thing happens but for the light sensor if the current amount of light is higher then the limit then a led goes off.

Here is the hard part, I tried and I tried but I failed, so I had to go to the dark side and asked chatgpt. What I couldn't figure out was how to make the alarm stay on so chatgpt suggested me to make a new const named alarm and use that for the tilt and the crash sensors.

image

image

image

I currently do not have any footage of it actually working but I have lessons on tuesday so I can ask my teacher if I can film it for hackclub. And if you are wondering why I but the journal as 2 hours spent it is because I have 2 hours of class and I used it all.