Ultrasonic sensor HC-SR04 with Arduino(code explained) Distance Measuring Senosr -Arduino tutorial 9

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Part 9:
    * Ultrasonic sensor working
    * code explanation
    Code and Circuit : drive.google.c...
    Learn Arduino programming even without components (Online Arduino Simulator) :
    Tutorial video - • How to learn Arduino u...
    *-*-*-*-*-*-*-**-*-*-*
    Product Links:
    Arduino Uno : www.flyrobo.in...
    OR
    amzn.to/3ZFLUFQ
    Ultrasonic Sensor : www.flyrobo.in...
    or
    amzn.to/3Ocyonv
    -*-*-*-*-*-*-*-*-*-*
    Follow us on Instagram :
    / tech_at_home
    Like us on Facebook :
    / tech-at-home-220885266...
    #ArduinoTutorials#ultrasonicsensor#techathome
    Thanks for watching!
    *Like Share and Subscribe

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

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

    Hello, I have the same problem with LET’S UNBOX!, as you have stated, I checked the pins and replaced all the jumper wires, but it still does not work, it keeps repeating “0”. Would you possibly know what else is the problem?

    • @techathome
      @techathome  2 года назад +1

      This issue is because, signals from sensor are not reaching Arduino pins,
      - Check wire
      - Check connections
      - Replace sensor

  • @ramybrahim3188
    @ramybrahim3188 9 месяцев назад +1

    Thank you
    From Morocco

  • @shyamsundar7784
    @shyamsundar7784 Год назад +2

    Good explanation

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

    Thanks bro 👍👊👌

  • @kapil409
    @kapil409 Год назад +1

    Ser_open() : can't set com- state showing uploading error

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

      Unplug and replug again and try.
      Also plug it to different com port.

  • @electro2585
    @electro2585 9 месяцев назад +1

    Your formula is wrong and is not working properly

  • @tharunraj814
    @tharunraj814 5 месяцев назад

    Sketch uses 2526 bytes (7%) of program storage space. Maximum is 32256 bytes.
    Global variables use 188 bytes (9%) of dynamic memory, leaving 1860 bytes for local variables. Maximum is 2048 bytes.
    avrdude: ser_open(): can't open device "\\.\COM5": Access is denied.
    Failed uploading: uploading error: exit status 1

    • @techathome
      @techathome  5 месяцев назад

      unplug and re-plug the board

  • @yourevolution7850
    @yourevolution7850 6 месяцев назад +1

    Iska value itna fluctuate knyu kar rha he?

  • @itsSatvik59
    @itsSatvik59 Год назад +1

    make another 20 parts, very nice videos

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

      Thank you. We will make more..
      There are around 30 video as of now : ruclips.net/p/PL4B0LEKY-jrT_fjOGkX_NZ52ZHZf8s9S-

  • @anithasshenoy6662
    @anithasshenoy6662 6 месяцев назад

    Thanks for this video. I am not getting anything from the pulseIn() . Hence the distance is showing zero. I have two new modules. Both show the same result. What could be the reason ?

    • @techathome
      @techathome  6 месяцев назад +1

      Check the continuity of jumper wires, sometimes they will be faulty.

    • @anithasshenoy6662
      @anithasshenoy6662 6 месяцев назад

      @@techathome I removed it from breadboard and connected directly. Now it is working. thks

  • @atiiveerjain510
    @atiiveerjain510 Месяц назад

    Thanks

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

    is there any way using vb form to connect that?

  • @Isanjay.13
    @Isanjay.13 9 месяцев назад

    Bro its emergency can we write the same program for the project train accident prevention if not can u pls say the procedures how to write tomorrow is my science expo only the coding is pending can u pls help bro plssss

    • @techathome
      @techathome  9 месяцев назад

      Can u send request on mail, I am not completely clear with your project requirements: deepakhd20@gmail.com

  • @kirans9395
    @kirans9395 Год назад +1

    Why have you divided by?
    Due to 2 microsecond delay?

    • @krk101
      @krk101 5 месяцев назад +1

      We need half of the time taken by the sound. We get the total time, sensor to object and back. But we only need time taken to reach the object. So it's half.

  • @VivekBJha
    @VivekBJha 2 месяца назад

    Please can you give me pins in written form file is not opening

    • @techathome
      @techathome  2 месяца назад

      Can u send mail: deepakhd20@gmail.com

  • @TestCreate-v6g
    @TestCreate-v6g 2 месяца назад

    Cant find the google drive

    • @techathome
      @techathome  2 месяца назад

      Can u send mail request: deepakhd20@gmail.com

  • @ravikumarkankanala4092
    @ravikumarkankanala4092 29 дней назад

    Sir sound is not coming

    • @techathome
      @techathome  28 дней назад

      Check the connections and jumper wires.

  • @pizafox12
    @pizafox12 2 месяца назад

    What program do you use?

    • @techathome
      @techathome  2 месяца назад

      Arduino
      The link for code is in description

  • @mrwildmouth5876
    @mrwildmouth5876 9 месяцев назад

    Which board are you using ?

  • @yamanjain9346
    @yamanjain9346 Год назад +1

    Do you all were able to here audio after 3:42

    • @techathome
      @techathome  Год назад +1

      I checked now,
      Everything was fine before,
      Last week there was some copyright issue for background music.
      So we removed that.
      Somehow this explanation voice also got deleted.

    • @harunshankar6041
      @harunshankar6041 Год назад +1

      @@techathome unable to hear after 3:42

    • @BromideBride
      @BromideBride 17 дней назад

      There is no audio description still. Maybe you can edit or add text description to the video.

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

    I'm getting distance 0 on serial monitor everytime. What to do?

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

      Check the pins connections of ultrasonic sensor and also replace the jumper wires

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

      @@techathome ok I will try

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

      @@Bigbrainie Did u solved it..

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

      @@fusionworld6871 yes

  • @Bigbrainie
    @Bigbrainie 2 года назад +2

    Can we print the distance on lcd instead of serial? Where should I make the changes in code?
    If possible, please make a video.
    I am a beginner :-)

    • @techathome
      @techathome  2 года назад +1

      We have done tutorial on that, you can refer to below two video links:
      Lcd1 - ruclips.net/video/fyL1h62QHJs/видео.html
      Lcd2 - ruclips.net/video/LyuybcoNEsw/видео.html

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

      @@techathome Thanks bro, tutorial 17 helped me!

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

      Welcome

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

      ​@@techathome hello sir.

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

      ​​@@techathome code pahije hota ya vdo cha

  • @hahahahahaha664
    @hahahahahaha664 3 месяца назад

    what is pinmode for??

    • @techathome
      @techathome  3 месяца назад +1

      This is used to set the mode of the pin. Either you want to use particular pin as input or output.
      ruclips.net/video/EJEz6t5SpMw/видео.html

  • @bozakardude
    @bozakardude 9 месяцев назад

    the thing that shows the distance doesnt show up

    • @techathome
      @techathome  9 месяцев назад

      I didn't get your question.

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

    Bro.
    I am getting some values and o in between the values ..

    • @techathome
      @techathome  2 года назад +1

      If you are not inside its range,
      It will give some random values

  • @muninggamer7621
    @muninggamer7621 7 месяцев назад

    how to increase the range of the ultrasonic sensor?

    • @techathome
      @techathome  7 месяцев назад

      It is not possible to increase the range with software.
      It depends on the specifications of ultrasonic sensor.

  • @scout3526
    @scout3526 9 месяцев назад

    Bro some 800 , 1000 values are getting displayed how to avoid those values .?

    • @techathome
      @techathome  9 месяцев назад

      If you go beyond the range it gives random values sometimes. This is basic code to understand the working. Use ultrasonic library, this issue might resolve. Download and install this one: downloads.arduino.cc/libraries/github.com/ErickSimoes/Ultrasonic-3.0.0.zip

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

    can you explain the formula bro
    why should we divede it by 9?

  • @chandru6022
    @chandru6022 6 месяцев назад

    is it working

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

    in second last line you haven't use semi colon ;

    • @techathome
      @techathome  Год назад +1

      Oh, my be we have to update the code file

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

    subscribed :-)

  • @nandikolasravani2498
    @nandikolasravani2498 8 месяцев назад +3

    Code please

    • @techathome
      @techathome  8 месяцев назад +1

      I have provided the zip file link in description, download and extract.

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

    help not working

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

    I need ckt diagram

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

      Download the compressed file in description box and extract it

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

    There is no file at your google drive code section . Im reporting

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

      I have provided zip file : drive.google.com/file/d/1nBpfZG43UC30DHSi5e6XjFo3WjFhL3s1/view
      Download and extract it, you will get code and circuit.

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

      ​@@techathomeit's showing that the file is unsupported!

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

      Use winRaR software to extract on computer.