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

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ค. 2020
  • Part 9:
    * Ultrasonic sensor working
    * code explanation
    Code and Circuit : drive.google.com/file/d/1nBpf...
    Learn Arduino programming even without components (Online Arduino Simulator) :
    Tutorial video - • How to learn Arduino u...
    *-*-*-*-*-*-*-**-*-*-*
    Product Links:
    Arduino Uno : amzn.to/41eVm5A
    Ultrasonic Sensor : 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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 64

  • @shivufpv6248
    @shivufpv6248 3 ปีที่แล้ว +2

    Thanks bro 👍👊👌

  • @khannreactions3311
    @khannreactions3311 ปีที่แล้ว

    is there any way using vb form to connect that?

  • @ramybrahim3188
    @ramybrahim3188 5 หลายเดือนก่อน

    Thank you
    From Morocco

    • @techathome
      @techathome  5 หลายเดือนก่อน +2

      Welcome

  • @shyamsundar7784
    @shyamsundar7784 ปีที่แล้ว +1

    Good explanation

  • @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 : th-cam.com/play/PL4B0LEKY-jrT_fjOGkX_NZ52ZHZf8s9S-.html

  • @meskhetian642
    @meskhetian642 ปีที่แล้ว +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  ปีที่แล้ว +1

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

  • @anithasshenoy6662
    @anithasshenoy6662 2 หลายเดือนก่อน

    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  2 หลายเดือนก่อน +1

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

    • @anithasshenoy6662
      @anithasshenoy6662 2 หลายเดือนก่อน

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

  • @kirans9395
    @kirans9395 9 หลายเดือนก่อน +1

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

    • @krk101
      @krk101 หลายเดือนก่อน +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.

  • @kapil409
    @kapil409 9 หลายเดือนก่อน +1

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

    • @techathome
      @techathome  9 หลายเดือนก่อน

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

  • @memeworld.24.7
    @memeworld.24.7 5 หลายเดือนก่อน

    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  5 หลายเดือนก่อน

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

  • @ushakiran8285
    @ushakiran8285 ปีที่แล้ว

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

  • @adithyanvj2919
    @adithyanvj2919 ปีที่แล้ว

    subscribed :-)

  • @yourevolution7850
    @yourevolution7850 2 หลายเดือนก่อน +1

    Iska value itna fluctuate knyu kar rha he?

  • @fusionworld6871
    @fusionworld6871 ปีที่แล้ว

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

    • @techathome
      @techathome  ปีที่แล้ว +1

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

  • @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 - th-cam.com/video/fyL1h62QHJs/w-d-xo.html
      Lcd2 - th-cam.com/video/LyuybcoNEsw/w-d-xo.html

    • @Bigbrainie
      @Bigbrainie 2 ปีที่แล้ว

      @@techathome Thanks bro, tutorial 17 helped me!

    • @techathome
      @techathome  2 ปีที่แล้ว

      Welcome

    • @shrv20321
      @shrv20321 6 หลายเดือนก่อน

      ​@@techathome hello sir.

    • @shrv20321
      @shrv20321 6 หลายเดือนก่อน

      ​​@@techathome code pahije hota ya vdo cha

  • @mrwildmouth5876
    @mrwildmouth5876 5 หลายเดือนก่อน

    Which board are you using ?

    • @techathome
      @techathome  5 หลายเดือนก่อน

      Arduino Uno

  • @devchaudhary5892
    @devchaudhary5892 8 หลายเดือนก่อน

    I need ckt diagram

    • @techathome
      @techathome  8 หลายเดือนก่อน

      Download the compressed file in description box and extract it

  • @tharunraj814
    @tharunraj814 2 หลายเดือนก่อน

    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  2 หลายเดือนก่อน

      unplug and re-plug the board

  • @muninggamer7621
    @muninggamer7621 3 หลายเดือนก่อน

    how to increase the range of the ultrasonic sensor?

    • @techathome
      @techathome  3 หลายเดือนก่อน

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

  • @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 ปีที่แล้ว

      @@Bigbrainie Did u solved it..

    • @Bigbrainie
      @Bigbrainie ปีที่แล้ว

      @@fusionworld6871 yes

  • @electro2585
    @electro2585 5 หลายเดือนก่อน +1

    Your formula is wrong and is not working properly

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

  • @yamanjain9346
    @yamanjain9346 11 หลายเดือนก่อน +1

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

    • @techathome
      @techathome  11 หลายเดือนก่อน +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 9 หลายเดือนก่อน

      @@techathome unable to hear after 3:42

  • @bozakardude
    @bozakardude 5 หลายเดือนก่อน

    the thing that shows the distance doesnt show up

    • @techathome
      @techathome  5 หลายเดือนก่อน

      I didn't get your question.

  • @scout3526
    @scout3526 5 หลายเดือนก่อน

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

    • @techathome
      @techathome  5 หลายเดือนก่อน

      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

  • @godgajet6763
    @godgajet6763 ปีที่แล้ว

    help not working

  • @chandru6022
    @chandru6022 2 หลายเดือนก่อน

    is it working

  • @nandikolasravani2498
    @nandikolasravani2498 4 หลายเดือนก่อน +1

    Code please

    • @techathome
      @techathome  4 หลายเดือนก่อน +1

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

  • @hazimmuhammed5125
    @hazimmuhammed5125 11 หลายเดือนก่อน

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

    • @techathome
      @techathome  11 หลายเดือนก่อน

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

    • @remogamer2029
      @remogamer2029 6 หลายเดือนก่อน

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

    • @techathome
      @techathome  6 หลายเดือนก่อน

      Use winRaR software to extract on computer.