American Cheaper Alarm S6

by gokuSSJ1000 in Living > Life Hacks

230 Views, 2 Favorites, 0 Comments

American Cheaper Alarm S6

download (5).jpg
download (6).jpg
download (7).jpg
download talquei.jpg

We decided to do a movement sensor that is cheaper than the normal one, and the poor people can buy it because it works perfectly. We used those components:

. Female-female wires and male-male wires;

. Buzzer;

. Sensor of movement;

. Arduíno UNO;

Creating the Hardware

2z7o375.gif

We use the motion sensor and we connect the three sensor pins on several female-to-female wires and then connect these wires to the male-male wires. These wires were connected to the Arduino ONE. All the (arduino) holes that were numbered are being cited in the code made in the arduino. In the next page we are going to see the code that we used.

The First Code

download 8000.png

#define pinPIR 7

const int buzzer = 5;

void setup() { pinMode(buzzer, OUTPUT); pinMode(pinPIR, INPUT); Serial.begin(9600); }

void loop() { bool valorPIR = digitalRead(pinPIR);

if (valorPIR) { Serial.println("FDS"); digitalWrite(buzzer, HIGH); } else { Serial.println("-----"); digitalWrite(buzzer, LOW); } }

This was the first code, but it didin´t make a sound, because we were able to do it on the second try.

Final Version

IMG-20181122-WA0179 (2).jpg
IMG-20181122-WA0180.jpg

We just add new codes for the Buzzer to make the sound.

Reflections

porra.gif

We used a lot of help from those sites, but we could do it, because we gave our blood on the project.

http://www.comofazerascoisas.com.br/como-fazer-um-...

https://pandoralab.com.br/tutorial/tutorial-alarme...