Это видео недоступно.
Сожалеем об этом.
Arduino Ultrasonic Distance Alarm
HTML-код
- Опубликовано: 29 дек 2017
- Hey friends in this video I will show you how to make Ultrasonic Distance Alarm with Arduino
Visit my Website to Download Codes and Circuit Diagrams:- www.viralscien...
Circuit:- drive.google.c...
Materials:-
Arduino UNO
Ultrasonic Sensor
Breadboard
Jumpers
LED
Buzzer
Code:- drive.google.c...
Follow me on:-
Facebook:- / viralscience20
Facebook:- / viral.dodhia.73
Instagram:- / viral_dodhia_
Twitter:- / viral_science_
snapchat:- viraldodhia20
--------- VIRAL SCIENCE © ----------
For anyone asking, here is the code:
//viral science
//Ultrasonic Distance alarm
const int trigPin = 9;
const int echoPin = 10;
const int buzzer = 11;
const int ledPin = 13;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
safetyDistance = distance;
if (safetyDistance
Give me code when someone detect ultrasonic sensor alram working 5 second
Thanks !
thank you very much you are so helpful
@@SHADOW-hs2kp no problem!
Nice, I need to make a security beeper for my brothers car because someone keeps trying to break in. This is perfect. Thanks!
hi sir can u reverse the command so if there is no object the alarm will work ?
Could you please leave a link allowing us to copy and paste the Arduino code, that would be very helpful since I am using it for a Science fair project.
@BRAYAN JAY GUNDUL agree code please
the link of code is die bro😭
Thanks mahn you saved me from the deadline
I can use it with the program in my Phone?
Nice video man 👨. Keep it up. U inspired me a lot
//viral science
//Ultrasonic Distance alarm
const int trigPin = 9;
const int echoPin = 10;
const int buzzer = 11;
const int ledPin = 13;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
safetyDistance = distance;
if (safetyDistance
Thanks for the help!
Give me code when someone detect ultrasonic sensor alram working 5 second
why is my LED still flashing and buzzer sounding even though there is no object in front?
how many did the all set up and then when they went to download the code, there was no code? It was not funny.
I am not getting the codes from your website also. Can u plz tell me that how could I get the codes. Plz reply it's urgent.
Greetings from the philippines...I would like to ask if i can use JSN-SR04T sensor in this set up?
Super clean tutorial. Keep it up
Awesome dude 👌👌
Keep going on and on
I have a question. Please answer. If you disconnect it from computer, will it work ? Can you make it work with batterry.
Yes..With 9v battery and barrel jack.
get a portable charger homie !
you may use 12v also but use below 12V if you use clone... usb charger is the best
Hello, For some reason I get distance = 0 in serial monitor. I don't understand why, kindly let me know if possible
Awesome vid bro keep it up
I have to new version of the buzzer and it doesn’t fit in 2 holes what should I do
Thank you clarity is good
The program IS not in thé description .....
Check my comment
had it runnign and all of a sudden the ultrasonic sensor
stopped working
can i add camera to it when detect movement and take picture
Thanks a lot bro
Sir, this tutorial helps me to complete my project. Thanks alot.
Very Good sir
I need code please will you provide me!!!!
I know the link is in description but I think it has expired there's no code there
can i increase the range of ultrasonic sensor ........please reply.
This is great but I have a problem. It works when connected via USB but with a 9v battery it stops working after about 1 minute. Do you know why?
It was the battery. Do you know roughly how long it will last on a 9v battery? If it just left on
@@lideaecerta6762 Forgot to switch accounts?
i have a project on Arduino, can u help me plz?
What's the maximum effective distance for the ultrasonic sensor to alarm?
Brent Jebulan 400 cm
400 cm
Excuse me bro if we implement this project as a final year project so in a Thesis what will we write in a problem statement section ?
Hold my coffee bro, If i will give all materials then what will be your contribution to your project.
Complete copy paste ?
@@ViralScience bro i made this project already i have taken help from your vedio but i have a problem in thesis what should be write in a PROBLEM STATEMENT section please help me bro.
Can you connect multiple sensors to the arduino?
yes
Hi! Can you give us the access of your Drive? I can't open it.
Thanks! :)
Bro can we set a distance of 2 meters? Would it work ??
Good !!
CAN I MAKE IT WITHOUT BREADBOARD PLEASE SAY THEN PLEASE SEND A SKETCH OF CONNECTIONS TO
Can You Please Upload the Coding in the Comment Section..
The Link is not working
Helpful!
google drive files can´t open, error 404 in page
//viral science
//Ultrasonic Distance alarm
const int trigPin = 9;
const int echoPin = 10;
const int buzzer = 11;
const int ledPin = 13;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
safetyDistance = distance;
if (safetyDistance
@@choomp2636 send me code please....alram working time 5 second
link is invalid you provided for code and circuit................please provide code and circuit diagram
From where do u get the material?
Why no battery is there from where the power is getting pls tell
Ya bro same doubt..
The arduno board uses power from laptop which we used to code arduno.As we observe he doesn't unplug the cable connecting arduno and laptop.
i can't find the code. and circuit diagram.
If i want to have it run like without usb how.....
cool yaar
Please send me code with alram working 5 second
fast delivery should be needed
the URL isn't work
Was 80cm the max range you got a reliable result?
4 meters is max according to datasheet
You should mention the kit Name. And where it will available...
elegoo uno r3 has all the pices
Hello, could you pass me the arduino code since it does not let me enter the drive
The link to the code isn't opening
I am getting error
not able to open code
the code is expired please change it
can you repost the link of the circuit plz ?
Hi man! great video but the link to the code doesn't work anymore? could you put up a new one? thanks in advance!
EDIT: nvm I found it on your website! thanks!
where did you find it
pls help
@@mufei4105 on his website brother, in his description? or google his name
@@bramcopermans7494 thx brother appreciate it
Below is the code...you can change the distance to whatever value you like but it should be
P i r sensor and and CCTV camera capture human motivation project please share
hey the code link is broken
code doesnot work
Give the link of the code
//viral science
//Ultrasonic Distance alarm
const int trigPin = 9;
const int echoPin = 10;
const int buzzer = 11;
const int ledPin = 13;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
safetyDistance = distance;
if (safetyDistance
What is the maximum distance of sensing
Ok
Thank u
can someone give me the code pls?
check it on the description
Give me code when ultrasonic sensor detect someone in 110 centimeters alram Working 5 second
Just edit the delay for 5 sec that is 5000
And increase the distance in the code
Sir can't working
Hi sir, can I get code and circuit ?
Thank you
GO TO HIS SITE AND YOU WILL GET IT
Where's the code? :'(
Code expired
How much distance can detected.... This sensor can 500m. can detect???
Please give that sensor name please please rply
you made a radar
how to make 3d printer
I2c please
Why I follow the ways but it keeps on showing distance : 0 such things in the promgramming result ?
Check your connections of trig and echo pins
@@ViralScience thks👍
why's the starting music was terrible
Bro code is expired plz help urs
Visit my website www.viralsciencecreativity.com
And get codes and circuit diagram for your project
PLS GİVE ME THE CODE PLS
check it in the description
Hey I want two ultrasonic
Your channel is not growing
badly needed