Это видео недоступно.
Сожалеем об этом.

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 © ----------

Комментарии • 122

  • @bramcopermans7494
    @bramcopermans7494 4 года назад +13

    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

  • @d3bbi339
    @d3bbi339 3 года назад +1

    Nice, I need to make a security beeper for my brothers car because someone keeps trying to break in. This is perfect. Thanks!

  • @TR_1ST
    @TR_1ST 4 года назад +3

    hi sir can u reverse the command so if there is no object the alarm will work ?

  • @lachlanzidar7202
    @lachlanzidar7202 6 лет назад +18

    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.

    • @vathoram2825
      @vathoram2825 2 года назад

      @BRAYAN JAY GUNDUL agree code please

  • @gentasatyaseta6820
    @gentasatyaseta6820 3 года назад +4

    the link of code is die bro😭

  • @infact7293
    @infact7293 10 месяцев назад

    Thanks mahn you saved me from the deadline

  • @Tower03
    @Tower03 5 лет назад +2

    I can use it with the program in my Phone?

  • @lucifergamingfreefire4199
    @lucifergamingfreefire4199 6 лет назад +1

    Nice video man 👨. Keep it up. U inspired me a lot

  • @choomp2636
    @choomp2636 5 лет назад +3

    //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

  • @zakiosman6539
    @zakiosman6539 Год назад

    why is my LED still flashing and buzzer sounding even though there is no object in front?

  • @bernadettevandal5273
    @bernadettevandal5273 3 года назад +2

    how many did the all set up and then when they went to download the code, there was no code? It was not funny.

  • @user-bo2sf7bo1f
    @user-bo2sf7bo1f 4 года назад

    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.

  • @ramilpastidio2212
    @ramilpastidio2212 3 года назад

    Greetings from the philippines...I would like to ask if i can use JSN-SR04T sensor in this set up?

  • @bryzxc0030
    @bryzxc0030 3 года назад

    Super clean tutorial. Keep it up

  • @mr.woldwide
    @mr.woldwide 5 лет назад +1

    Awesome dude 👌👌

  • @jagabandhumandal5890
    @jagabandhumandal5890 6 лет назад

    Keep going on and on

  • @mevlanisufi2100
    @mevlanisufi2100 5 лет назад +1

    I have a question. Please answer. If you disconnect it from computer, will it work ? Can you make it work with batterry.

    • @hridhweshmaity5611
      @hridhweshmaity5611 5 лет назад

      Yes..With 9v battery and barrel jack.

    • @AndreClassicCuts
      @AndreClassicCuts 5 лет назад

      get a portable charger homie !

    • @minivipers
      @minivipers 4 года назад

      you may use 12v also but use below 12V if you use clone... usb charger is the best

  • @gopikasarasvathikothandara5144
    @gopikasarasvathikothandara5144 3 года назад

    Hello, For some reason I get distance = 0 in serial monitor. I don't understand why, kindly let me know if possible

  • @drakatislit
    @drakatislit 3 года назад

    Awesome vid bro keep it up

  • @dfaludi
    @dfaludi 4 года назад

    I have to new version of the buzzer and it doesn’t fit in 2 holes what should I do

  • @incredibleideas-lakshmi7922
    @incredibleideas-lakshmi7922 5 лет назад

    Thank you clarity is good

  • @Pluzdev
    @Pluzdev 5 лет назад +3

    The program IS not in thé description .....

  • @moistpretzelz5799
    @moistpretzelz5799 3 года назад +1

    had it runnign and all of a sudden the ultrasonic sensor
    stopped working

  • @adamiskandar7845
    @adamiskandar7845 2 года назад

    can i add camera to it when detect movement and take picture

  • @itsnewsgalaxy5626
    @itsnewsgalaxy5626 4 года назад +1

    Thanks a lot bro

  • @vishnudhiman6953
    @vishnudhiman6953 4 года назад

    Sir, this tutorial helps me to complete my project. Thanks alot.

  • @afnanahmed4588
    @afnanahmed4588 3 года назад

    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

  • @arpit3210
    @arpit3210 5 лет назад

    can i increase the range of ultrasonic sensor ........please reply.

  • @lideaecerta6762
    @lideaecerta6762 4 года назад

    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?

    • @lideaecerta6762
      @lideaecerta6762 4 года назад

      It was the battery. Do you know roughly how long it will last on a 9v battery? If it just left on

    • @VLTNO
      @VLTNO 4 года назад

      @@lideaecerta6762 Forgot to switch accounts?

  • @user-ni9oh4jj3f
    @user-ni9oh4jj3f 2 года назад

    i have a project on Arduino, can u help me plz?

  • @brentjebulan2190
    @brentjebulan2190 5 лет назад +1

    What's the maximum effective distance for the ultrasonic sensor to alarm?

  • @amirkhan9568
    @amirkhan9568 3 года назад

    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 ?

    • @ViralScience
      @ViralScience  3 года назад +2

      Hold my coffee bro, If i will give all materials then what will be your contribution to your project.
      Complete copy paste ?

    • @amirkhan9568
      @amirkhan9568 3 года назад

      @@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.

  • @marielkassandralourainegon3387
    @marielkassandralourainegon3387 3 года назад +1

    Can you connect multiple sensors to the arduino?

  • @johnmarkpadayhag6259
    @johnmarkpadayhag6259 3 года назад

    Hi! Can you give us the access of your Drive? I can't open it.

  • @marthalillyan7357
    @marthalillyan7357 4 года назад +1

    Thanks! :)

  • @shankarpediredla666
    @shankarpediredla666 4 года назад

    Bro can we set a distance of 2 meters? Would it work ??

  • @ItaloLima
    @ItaloLima 6 лет назад

    Good !!

  • @djdjdfjdjdxmxk5272
    @djdjdfjdjdxmxk5272 5 лет назад

    CAN I MAKE IT WITHOUT BREADBOARD PLEASE SAY THEN PLEASE SEND A SKETCH OF CONNECTIONS TO

  • @naveenr5742
    @naveenr5742 2 года назад

    Can You Please Upload the Coding in the Comment Section..
    The Link is not working

  • @rugvednaniwadekar3744
    @rugvednaniwadekar3744 4 года назад

    Helpful!

  • @brenotavares5805
    @brenotavares5805 5 лет назад +1

    google drive files can´t open, error 404 in page

    • @choomp2636
      @choomp2636 5 лет назад +2

      //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

    • @SEM.Solarc.Technologies
      @SEM.Solarc.Technologies 4 года назад

      @@choomp2636 send me code please....alram working time 5 second

  • @msaadbeinge
    @msaadbeinge 3 года назад

    link is invalid you provided for code and circuit................please provide code and circuit diagram

  • @apoorvarastogi8550
    @apoorvarastogi8550 6 лет назад

    From where do u get the material?

  • @kabirlakhmapure1207
    @kabirlakhmapure1207 5 лет назад +1

    Why no battery is there from where the power is getting pls tell

    • @abhishekpolamarasetty5920
      @abhishekpolamarasetty5920 5 лет назад

      Ya bro same doubt..

    • @le402p.pavani7
      @le402p.pavani7 4 года назад

      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.

  • @vivansheth1902
    @vivansheth1902 3 года назад

    i can't find the code. and circuit diagram.

  • @yeshacroe9354
    @yeshacroe9354 4 года назад

    If i want to have it run like without usb how.....

  • @devsant1936
    @devsant1936 6 лет назад

    cool yaar

  • @SEM.Solarc.Technologies
    @SEM.Solarc.Technologies 4 года назад +1

    Please send me code with alram working 5 second

  • @ayenewyewilsw4500
    @ayenewyewilsw4500 5 лет назад

    fast delivery should be needed

  • @mixguider7428
    @mixguider7428 3 года назад

    the URL isn't work

  • @xxlabratxx01
    @xxlabratxx01 3 года назад

    Was 80cm the max range you got a reliable result?

    • @Aethelbeorn
      @Aethelbeorn 3 года назад

      4 meters is max according to datasheet

  • @ankitd7398
    @ankitd7398 6 лет назад

    You should mention the kit Name. And where it will available...

    • @hackind6690
      @hackind6690 4 года назад

      elegoo uno r3 has all the pices

  • @markooviedo4006
    @markooviedo4006 2 года назад

    Hello, could you pass me the arduino code since it does not let me enter the drive

  • @ja.x8588
    @ja.x8588 3 года назад

    The link to the code isn't opening

  • @aishwaryakarhade
    @aishwaryakarhade 6 лет назад +1

    I am getting error

  • @drakatislit
    @drakatislit 3 года назад

    not able to open code

  • @blacksquad8565
    @blacksquad8565 Год назад

    the code is expired please change it

  • @ourproprety8924
    @ourproprety8924 4 года назад

    can you repost the link of the circuit plz ?

  • @bramcopermans7494
    @bramcopermans7494 4 года назад +1

    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!

    • @mufei4105
      @mufei4105 3 года назад

      where did you find it
      pls help

    • @bramcopermans7494
      @bramcopermans7494 3 года назад

      @@mufei4105 on his website brother, in his description? or google his name

    • @mufei4105
      @mufei4105 3 года назад

      @@bramcopermans7494 thx brother appreciate it

    • @simplelifehackske
      @simplelifehackske 2 года назад

      Below is the code...you can change the distance to whatever value you like but it should be

  • @Mohanraj-bo8ds
    @Mohanraj-bo8ds 6 лет назад

    P i r sensor and and CCTV camera capture human motivation project please share

  • @bilalsyed5854
    @bilalsyed5854 5 лет назад

    hey the code link is broken

  • @Phakookie
    @Phakookie 3 года назад

    code doesnot work

  • @arnabghosh9622
    @arnabghosh9622 5 лет назад +1

    Give the link of the code

    • @choomp2636
      @choomp2636 5 лет назад +5

      //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

  • @tharunv1885
    @tharunv1885 6 лет назад

    What is the maximum distance of sensing

  • @rubenbester5267
    @rubenbester5267 5 лет назад +1

    can someone give me the code pls?

    • @jonecj8139
      @jonecj8139 3 года назад

      check it on the description

  • @SEM.Solarc.Technologies
    @SEM.Solarc.Technologies 4 года назад

    Give me code when ultrasonic sensor detect someone in 110 centimeters alram Working 5 second

  • @dionseptianpratamaputra6631
    @dionseptianpratamaputra6631 4 года назад +1

    Hi sir, can I get code and circuit ?
    Thank you

    • @jeganp8583
      @jeganp8583 4 года назад

      GO TO HIS SITE AND YOU WILL GET IT

  • @emilianovargasoropeza7275
    @emilianovargasoropeza7275 3 года назад

    Where's the code? :'(

  • @Ainmx
    @Ainmx 3 года назад

    Code expired

  • @Yadav_ak17
    @Yadav_ak17 3 года назад

    How much distance can detected.... This sensor can 500m. can detect???
    Please give that sensor name please please rply

  • @mrn-jv2go
    @mrn-jv2go 4 года назад

    you made a radar

  • @bharathv.v1181
    @bharathv.v1181 6 лет назад

    how to make 3d printer

  • @skit6034
    @skit6034 5 лет назад

    I2c please

  • @ngzhitian1462
    @ngzhitian1462 4 года назад

    Why I follow the ways but it keeps on showing distance : 0 such things in the promgramming result ?

    • @ViralScience
      @ViralScience  4 года назад

      Check your connections of trig and echo pins

    • @ngzhitian1462
      @ngzhitian1462 4 года назад

      @@ViralScience thks👍

  • @humayra6397
    @humayra6397 5 лет назад

    why's the starting music was terrible

  • @bhavindedhia6911
    @bhavindedhia6911 5 лет назад

    Bro code is expired plz help urs

    • @ViralScience
      @ViralScience  5 лет назад

      Visit my website www.viralsciencecreativity.com
      And get codes and circuit diagram for your project

  • @mefexn
    @mefexn 3 года назад

    PLS GİVE ME THE CODE PLS

    • @jonecj8139
      @jonecj8139 3 года назад

      check it in the description

  • @k-nixe1224
    @k-nixe1224 4 года назад

    Hey I want two ultrasonic

  • @vhkrgaming7136
    @vhkrgaming7136 6 лет назад +3

    Your channel is not growing

  • @raulallanmandal7004
    @raulallanmandal7004 3 года назад

    badly needed