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
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?
This issue is because, signals from sensor are not reaching Arduino pins,
- Check wire
- Check connections
- Replace sensor
Thank you
From Morocco
Welcome
Good explanation
Thank you
Thanks bro 👍👊👌
Ser_open() : can't set com- state showing uploading error
Unplug and replug again and try.
Also plug it to different com port.
Your formula is wrong and is not working properly
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
unplug and re-plug the board
Iska value itna fluctuate knyu kar rha he?
make another 20 parts, very nice videos
Thank you. We will make more..
There are around 30 video as of now : ruclips.net/p/PL4B0LEKY-jrT_fjOGkX_NZ52ZHZf8s9S-
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 ?
Check the continuity of jumper wires, sometimes they will be faulty.
@@techathome I removed it from breadboard and connected directly. Now it is working. thks
Thanks
Welcome
is there any way using vb form to connect that?
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
Can u send request on mail, I am not completely clear with your project requirements: deepakhd20@gmail.com
Why have you divided by?
Due to 2 microsecond delay?
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.
Please can you give me pins in written form file is not opening
Can u send mail: deepakhd20@gmail.com
Cant find the google drive
Can u send mail request: deepakhd20@gmail.com
Sir sound is not coming
Check the connections and jumper wires.
What program do you use?
Arduino
The link for code is in description
Which board are you using ?
Arduino Uno
Do you all were able to here audio after 3:42
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.
@@techathome unable to hear after 3:42
There is no audio description still. Maybe you can edit or add text description to the video.
I'm getting distance 0 on serial monitor everytime. What to do?
Check the pins connections of ultrasonic sensor and also replace the jumper wires
@@techathome ok I will try
@@Bigbrainie Did u solved it..
@@fusionworld6871 yes
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 :-)
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
@@techathome Thanks bro, tutorial 17 helped me!
Welcome
@@techathome hello sir.
@@techathome code pahije hota ya vdo cha
what is pinmode for??
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
the thing that shows the distance doesnt show up
I didn't get your question.
Bro.
I am getting some values and o in between the values ..
If you are not inside its range,
It will give some random values
how to increase the range of the ultrasonic sensor?
It is not possible to increase the range with software.
It depends on the specifications of ultrasonic sensor.
Bro some 800 , 1000 values are getting displayed how to avoid those values .?
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
can you explain the formula bro
why should we divede it by 9?
is it working
yes
in second last line you haven't use semi colon ;
Oh, my be we have to update the code file
subscribed :-)
Code please
I have provided the zip file link in description, download and extract.
help not working
Check the connections
Bro don't use distance command
I need ckt diagram
Download the compressed file in description box and extract it
There is no file at your google drive code section . Im reporting
I have provided zip file : drive.google.com/file/d/1nBpfZG43UC30DHSi5e6XjFo3WjFhL3s1/view
Download and extract it, you will get code and circuit.
@@techathomeit's showing that the file is unsupported!
Use winRaR software to extract on computer.