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
  • Наука та технологія

КОМЕНТАРІ • 66

  • @khannreactions3311
    @khannreactions3311 Рік тому

    is there any way using vb form to connect that?

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

  • @electro2585
    @electro2585 5 місяців тому +1

    Your formula is wrong and is not working properly

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

  • @ramybrahim3188
    @ramybrahim3188 6 місяців тому

    Thank you
    From Morocco

  • @ushakiran8285
    @ushakiran8285 Рік тому

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

  • @shivufpv6248
    @shivufpv6248 4 роки тому +2

    Thanks bro 👍👊👌

  • @memeworld.24.7
    @memeworld.24.7 6 місяців тому

    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  6 місяців тому

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

  • @shyamsundar7784
    @shyamsundar7784 Рік тому +1

    Good explanation

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

  • @kapil409
    @kapil409 10 місяців тому +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.

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

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

  • @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 - ua-cam.com/video/fyL1h62QHJs/v-deo.html
      Lcd2 - ua-cam.com/video/LyuybcoNEsw/v-deo.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

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

  • @mrwildmouth5876
    @mrwildmouth5876 5 місяців тому

    Which board are you using ?

  • @hahahahahaha664
    @hahahahahaha664 7 днів тому

    what is pinmode for??

    • @techathome
      @techathome  7 днів тому +1

      This is used to set the mode of the pin. Either you want to use particular pin as input or output.
      ua-cam.com/video/EJEz6t5SpMw/v-deo.html

  • @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 6 місяців тому

    the thing that shows the distance doesnt show up

    • @techathome
      @techathome  6 місяців тому

      I didn't get your question.

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

  • @devchaudhary5892
    @devchaudhary5892 9 місяців тому

    I need ckt diagram

    • @techathome
      @techathome  8 місяців тому

      Download the compressed file in description box and extract it

  • @godgajet6763
    @godgajet6763 Рік тому

    help not working

  • @scout3526
    @scout3526 6 місяців тому

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

    • @techathome
      @techathome  6 місяців тому

      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

  • @adithyanvj2919
    @adithyanvj2919 Рік тому

    subscribed :-)

  • @chandru6022
    @chandru6022 3 місяці тому

    is it working

  • @nandikolasravani2498
    @nandikolasravani2498 5 місяців тому +1

    Code please

    • @techathome
      @techathome  5 місяців тому +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.