Hello everyone,
This project is an ultrasonic based security alarm. It is distance sensitive, so the buzzer beeps faster if the object is near and it beeps slowly if the object is far.
I first mounted the buzzer and ultrasonic sensor on the breadboard. Take two wires from the Arduino one for 5V and the other of GND and connect it to the breadboard. Then I connected the ultrasonic sensor in the following manner-
Trig pin - pin 6 of Arduino
Echo pin - pin 5 of Arduino
GND - GND pin
And in the end I connected the positive terminal of the buzzer to pin 2 and negative terminal to GND. After all the breadboard connections were done I connected the USB cable. Upload the sketch and check the distance on the serial monitor.
Hope you guys like this project. Experiment with the value of the delay and try out what works best for you. Don't forget to have fun with your project
Comments