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 - วิทยาศาสตร์และเทคโนโลยี
Thanks bro 👍👊👌
is there any way using vb form to connect that?
Thank you
From Morocco
Welcome
Good explanation
Thank you
make another 20 parts, very nice videos
Thank you. We will make more..
There are around 30 video as of now : th-cam.com/play/PL4B0LEKY-jrT_fjOGkX_NZ52ZHZf8s9S-.html
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
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
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.
Ser_open() : can't set com- state showing uploading error
Unplug and replug again and try.
Also plug it to different com port.
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
can you explain the formula bro
why should we divede it by 9?
subscribed :-)
Iska value itna fluctuate knyu kar rha he?
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
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 - th-cam.com/video/fyL1h62QHJs/w-d-xo.html
Lcd2 - th-cam.com/video/LyuybcoNEsw/w-d-xo.html
@@techathome Thanks bro, tutorial 17 helped me!
Welcome
@@techathome hello sir.
@@techathome code pahije hota ya vdo cha
Which board are you using ?
Arduino Uno
I need ckt diagram
Download the compressed file in description box and extract it
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
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.
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
Your formula is wrong and is not working properly
in second last line you haven't use semi colon ;
Oh, my be we have to update the code file
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
the thing that shows the distance doesnt show up
I didn't get your question.
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
help not working
Check the connections
Bro don't use distance command
is it working
yes
Code please
I have provided the zip file link in description, download and extract.
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.