Тёмный

Arduino ultrasonic sensor led projects | Hc-sr04 Ultrasonic sensor 

Mr ElectroUino
Подписаться 4,6 тыс.
Просмотров 282 тыс.
50% 1

Arduino Ultrasonic sensor ( Hc-sr04 ) with LEDs to measure the distance of object like scale.This is a very simple arduino projects for beginners. When an object comes close the hc-sr04 ultrasonic sensor indicates the distance using led. When red led is on that means the distance of an object is 50cm and yellow led is on that means the distance of an object is 4cm. ultrasonic sensor led project is some like a scale to finding distance measure of an object. we can easily extend the range of the Hc-sr04 sensor to changing code.
The HC-SR04 ultrasonic sensor uses to measure the distance to an object. It comes complete with ultrasonic transmitter and receiver modules. Hc-sr04 transmit high-frequency sound and when an object detects then reflect the signal to echo.
ultrasonic sensor Arduino
ultrasonic sensor on Arduino
arduino code for ultrasonic sensor with led
🔴Update Version of the ultrasonic sensor projects✅
• arduino ultrasonic sen...
➖➖➖➖➖➖➖➖🔴Sponsor🔴➖➖➖➖➖➖➖➖
Buy cheap, quality electronic, and Arduino products.
checkout now:- botuniverse.in/
The coupon code is: ELECTROUINO50
The coupon will allow you to get Rs.50 off on a minimum spend of Rs.500.
They are also delivering items during the lockdown.
------------------------------------[ 🟧 BUSINESS 🟧 ]-----------------------------------
⭐️If you want me to do custom projects or need my help in your projects,
so you can contact me.
✅ Instagram: / _mr_electrouino_
✅ Email: mr.electrouino786@gmail.com
----+----+----+----+1----+----+----+----+----+----+----+----+----+----+
New Video▶
🔴Variable power supply diy: • Dc adjustable power su...
Watch Next:✔
🔵 Arduino sequential LED | led chaser with 7 effects: • Arduino LED Projects |...
🔵Arduino 16x2 lcd display | arduino liquid crystal: • Arduino 16x2 lcd | ard...
🔵Arduino piano project | Conductive paint & Capacitive touch: • Arduino piano project ...
----+----+----+----+----+----+----+----+----+----+----+----+----+----+
Features of ultrasonic sensor hc-sr04:-
Distance measure:- 2cm to 400cm📏
Power Supply: +5V DC
Measuring Angle: 30 degree
uses as: Obstacle avoiding robot, distance measure, measure water level and many more.
Components Required🛠🛠🛠
1. Arduino Uno
2. Ultrasonic sensor Hc-sr04
3. 7 x LEDs
4. 7 x 220ohm resistor
5. Breadboard
6. jumper wire
*-*-*-*-*-*-*-*-*-*-*-*-*-*-codes and circuit-*-*-*-*-*-*-*-*-*-*-*-*-*-*
👀🔎Website:- Arduino Ultrasonic sensor hc-sr04 Measure distance with LEDs mrelectrouino.blogspot.com/20...
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-😊About us:-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Mr. ElectroUino is an education platform where we believe “Knowledge increases by sharing but not by saving” and it a community where we showcase you the best easy to follow tutorial on Engineering projects, Electronics, Robotics, DIY stuff, Arduino projects, Raspberry Pi, IOT project and many more such things that can bring out the best maker within you and help in making the World little smarter and techy.
#like #Share #Subscribe
*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Follow me on👍 : )
❤Instagram: - / _mr_electro. .
❤Facebook: - / mr.electroui. .
❤contact us:- mr.electrouino786@gmail.com
❤website:- mrelectrouino.blogspot.com/
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Songs🎵🎵🎵
Carefree by Kevin MacLeod
Source: incompetech.com/music/royalty-...
Cartoon - On & On (feat. Daniel Levi) [NCS Release]
Source: • Cartoon, Jéja - On & O...
Elektronomia - Sky High [NCS Release]
Source: • Elektronomia - Sky Hig...
-----------------------------------😎😎😎😎😎------------------------------------------
© Mr.ElectroUino
#Arduino #arduinoproject #Arduinotutorial #Arduinoprogramming
/////////////////////////////////////Tags/////////////////////////////////////////
Arduino Ultrasonic sensor led the project, distance measurement
,distance sensor,distance sensor for Arduino,Arduino hc-sr04 tutorial,Arduino with ultrasonic sensor,control LEDs with ultrasonic sensor,ultrasonic sensor application,tutorial sensor ultrasonic hc-sr04 Arduino,ultrasonic hc-sr04 Arduino led,ultrasonic range finder,ultrasonic sensor with arduino,ultrasonic sensor arduino,DIY Control LEDs with Hc-sr04,Distance measure with Ultrasonic sensor,arduino ultrasonic sensor tutorial,Arduino Ultrasonic sensor project,arduino led chaser,arduino with hc-sr04,ultrasonic sensor with arduino,hc sr04 with arduino,arduino hc-sr04,ultrasonic sensor for arduino,proximity sensor with arduino,ultrasonic sensors range,arduino ultrasonic sensor with led,code for ultrasonic sensor,how to make distance measure sensor,how to make arduino Ultrasonic sensor led project

Наука

Опубликовано:

 

17 июл 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 936   
@ugurertugrul6070
@ugurertugrul6070 4 года назад
Thanks for video. But I have a question . How Can I do this project with use active buzzer? How should be the circuit diagram and code?
@MrElectroUino
@MrElectroUino 4 года назад
if you want circuit diagram and code so send your Gmail id and do subscribe to my channel💖.
@shahrozKhan4u
@shahrozKhan4u 4 года назад
Shahrozgandapur@gmail.com
@shahrozKhan4u
@shahrozKhan4u 4 года назад
Send the code
@MrElectroUino
@MrElectroUino 4 года назад
@@shahrozKhan4u Check your email i have sent the code and circuit.
@dikasaputra4548
@dikasaputra4548 4 года назад
dikawirasaputra@gmail.com :) please gift me code.
@Sniper9401
@Sniper9401 3 года назад
Amazing video, highly recommend, well explained and works perfectly. Thanks a lot
@MrElectroUino
@MrElectroUino 3 года назад
Thanks for watching 😊😊💖💙
@elxr8335
@elxr8335 2 года назад
thank you so much for this video, Mr. ElectroUino! you're literally a lifesaver. now, I can use this as a guide for my upcoming Arduino project. thank you again and have a nice day!!
@mebanteisalahe985
@mebanteisalahe985 2 года назад
you're the kind of teacher that I want which always come to the point without wasting our time 🥰 thankyou for this video
@MrElectroUino
@MrElectroUino 2 года назад
i'm glad to hear that 💙😊💚
@gawanijosephine9818
@gawanijosephine9818 Год назад
@@MrElectroUino I need a code
@gawanijosephine9818
@gawanijosephine9818 Год назад
I need a code please
@zogamthangboi
@zogamthangboi 4 года назад
duration = pulseIn(echo , HIGH); distance = (duration/2) / 28.5 ; Serial.println(distance); Hi Sir. Above code are taken from your arduino program. May i know what is 28.5 means? Thanks.
@MrElectroUino
@MrElectroUino 4 года назад
Visit my website for detail code explanation and don't forget to subscribe to my channel✔💙. Link👇 mrelectrouino.blogspot.com/2020/07/arduino-ultrasonic-sensor-with-leds.html?m=1
@user-uy8vj6yz2h
@user-uy8vj6yz2h Месяц назад
J
@noreentaher7113
@noreentaher7113 2 года назад
please I need your help ! What if you want to make it with one Led that works when you place your hand in front of it at what distance(without distance measure)? how is the circuit and codes? And do I need a relay module? knowing that it takes its energy from a solar cell not a battery.
@cyphrsphyr
@cyphrsphyr 4 года назад
Sweet...first if/else statement project complete! Thanks
@MrElectroUino
@MrElectroUino 4 года назад
Thanks for watching 💙💙 & don't forget to subscribe👍👍
@NGCgalaxy
@NGCgalaxy 4 года назад
thank you! I found out that taking the absolute value of the "duration" making it works much better. for some reason negative values pop out randomly in my setup
@MrElectroUino
@MrElectroUino 4 года назад
Excellent!
@maishasfishingzone634
@maishasfishingzone634 3 года назад
@@MrElectroUino Mr ElectroUino Can you Send me The code and diagram please? . I need the code urgently
@Kirti_Mankar
@Kirti_Mankar 4 года назад
Thanks for this video... 😀..
@arpanajain2787
@arpanajain2787 4 года назад
awesome man!!!!!!!! very good idea
@MrElectroUino
@MrElectroUino 4 года назад
Thank you! Cheers!💖
@prov8570
@prov8570 3 года назад
You deserve a like my guy
@MrElectroUino
@MrElectroUino 3 года назад
Thanks man💖💙 and don't forget to subscribe to my channel✔.
@sirvix9024
@sirvix9024 4 года назад
BROOOO THANK UUU SOOO MUCHH i was trying 2 do this but it never worked cuz the coding was wrong and the ppl on utube, ur the 1st person to make me get successful with this, i nearly threw away this perfectly good sensor cuz i never got it 2 work
@MrElectroUino
@MrElectroUino 4 года назад
Glad I could help
@saminaalam2416
@saminaalam2416 2 года назад
my code is not uploading the same code i have used
@sirvix9024
@sirvix9024 2 года назад
@@saminaalam2416 really?
@saminaalam2416
@saminaalam2416 2 года назад
Yes kindly help
@sirvix9024
@sirvix9024 2 года назад
@@saminaalam2416 im a bit unsure since a year ago ive been programming with arduino and now i havent done much with it
@Bianchi77
@Bianchi77 Год назад
Nice info, thanks for sharing it :)
@MrElectroUino
@MrElectroUino Год назад
Welcome 🤗
@pamuruchethan2903
@pamuruchethan2903 3 года назад
You are doing a lot of experiments well and you have to do lot of projects for everyone
@MrElectroUino
@MrElectroUino 3 года назад
Yaa I'm working on it😊😊 Thanks
@MarcosGarcia-bn4lm
@MarcosGarcia-bn4lm 3 года назад
in the second arduino screen did you only add those commands shown in the video? very cool the project, thanks for upload it
@MrElectroUino
@MrElectroUino 3 года назад
Yes, correct
@DavidAchukwu-ui6gm
@DavidAchukwu-ui6gm Месяц назад
good video thanks for you
@karenkim3177
@karenkim3177 4 месяца назад
Very good tutorial and project! I was able to follow your directions and got it to work properly. I was trying to add a function where the LED would turn off after 30 seconds of no movement and then reset/loop back but having trouble. I can get the LED to turn off after no movement for 30 seconds but I can't turn it back on when the sensor detects movement. I would appreciate any feedback.
@MrElectroUino
@MrElectroUino 4 месяца назад
Glad it helped!, can you contact me on Instagram: _mr_electrouino
@vaishnavibabar766
@vaishnavibabar766 Год назад
Thank you so much this really helped ❤️
@MrElectroUino
@MrElectroUino Год назад
Glad it helped!
@alejandroarreguin3628
@alejandroarreguin3628 3 года назад
Thank you it was truly very fun to make and helps learn coding arduino
@MrElectroUino
@MrElectroUino 3 года назад
Glad you liked it!
@alejandroarreguin3628
@alejandroarreguin3628 3 года назад
@@MrElectroUino I used this project's circuit set up to help me make another one I called "Traffic Lights". This really helped me make it = ).
@WhyuhereE
@WhyuhereE 2 года назад
Can you give me the code for using and OLED i2c Display to show distance with this project, It will be very helpful. Great Video Anyways!!
@DavidAchukwu-ui6gm
@DavidAchukwu-ui6gm Месяц назад
Amazing making many vido
@wanhanissuffia9899
@wanhanissuffia9899 2 года назад
Great video! I would like to ask if I don’t have the male to male jumper wire can i use the general purpose wire?
@talalrais9403
@talalrais9403 2 года назад
yeah you can use any wire
@MrElectroUino
@MrElectroUino 2 года назад
Thanks bro
@lilchocolate.gurl2023
@lilchocolate.gurl2023 9 месяцев назад
If we want a buzzer also to buzz and a single light will only glow , then what will be the circute diagram and the code ?
@user-wt2gc6ld3b
@user-wt2gc6ld3b 3 месяца назад
thank you
@tyreehornbeck2852
@tyreehornbeck2852 4 года назад
Is there a reason why , when I change the power source from the blue wire to the 9v battery it no longer functions like it's supposed to ? It only glows
@MrElectroUino
@MrElectroUino 4 года назад
It depends on how would you connect 9v battery to Arduino.🔌
@Fahimbkt
@Fahimbkt Год назад
Hi, I’m not sure if you are still looking at the comment but I’m doing a project like this but making it work with a dmx light. The ultrasonic sensor was not powerful enough to detect someone from a range so I’m going to be using a vl530x. I’m wondering how I can do the same project able to control the light power depending on distance with the vl530x
@MrElectroUino
@MrElectroUino Год назад
Hii, Yes you can do this project with this module. There is library for this sensor you need to use for do this project.
@Fahimbkt
@Fahimbkt Год назад
@@MrElectroUino hi I got to making the sensor work on its own now I’m just trying to figure out how to make the dmx shield and the vl530x work together. If
@MrElectroUino
@MrElectroUino Год назад
@@Fahimbkt sorry but I don't know much about dmx shield.
@yogeshagre2761
@yogeshagre2761 2 года назад
Really thank you so much you saved my life
@MrElectroUino
@MrElectroUino 2 года назад
You are most welcome
@cndyshop7011
@cndyshop7011 Год назад
Hi, loved your work Am trying it but My led won't stop blinking. It's blinking every second it takes reading. Apparent from that its working fine Can you please help.
@death_2486
@death_2486 24 дня назад
thank you very much everything is great
@MrElectroUino
@MrElectroUino 14 дней назад
Glad you like it!
@ne1kncode683
@ne1kncode683 Год назад
Thank you so much
@MrElectroUino
@MrElectroUino Год назад
Welcome 🤗
@AGMixArnavGupta
@AGMixArnavGupta 3 года назад
Very Good... 👌👌👌👌
@MrElectroUino
@MrElectroUino 3 года назад
Thanks😊😊
@AGMixArnavGupta
@AGMixArnavGupta 3 года назад
@@MrElectroUino Welcome, Please see my videos also
@antonolivermendez5000
@antonolivermendez5000 4 года назад
the 2nd one with leds are coded using hard coding, right? is it possible to code the same program using arrays, if statements and for loops?
@MrElectroUino
@MrElectroUino 4 года назад
Yaa it's possible with this...
@antonolivermendez5000
@antonolivermendez5000 4 года назад
@@MrElectroUino may i have insight to how that way of coding works. i tried but got confused halfway through the code, Thank you!
@LouisNg-ty7iy
@LouisNg-ty7iy 8 месяцев назад
Nice Video! if let's say I want to add on the Active buzzer, can you show me the circuit diagram and code?
@MrElectroUino
@MrElectroUino 8 месяцев назад
Send your email address.
@muhammadafif9396
@muhammadafif9396 2 года назад
Thank you sir you help me a lot
@MrElectroUino
@MrElectroUino 2 года назад
I glad to help you 😊👍.❤️
@itsnewsgalaxy5626
@itsnewsgalaxy5626 4 года назад
Wow its amazing
@MrElectroUino
@MrElectroUino 4 года назад
Thanks a lot 😊
@MegaYuas
@MegaYuas 3 года назад
thanks sir this is the first project which code is in working condition.
@MrElectroUino
@MrElectroUino 3 года назад
Ohh thanks💖💖 Do subscribe😊😊
@trunganghuu233
@trunganghuu233 2 года назад
thank you so much
@MrElectroUino
@MrElectroUino 2 года назад
i'm glad you liked it.
@supriyadi.eve18
@supriyadi.eve18 4 месяца назад
Is it possible if you don't use a breadboard, but use a decoder? and the lights use a 10 segment graph LED bar ?
@MrElectroUino
@MrElectroUino 4 месяца назад
Yes you can do.
@stephentangerine3779
@stephentangerine3779 3 года назад
Thank you man, it work 100% DO you have any idea how to insert displey on board and read the value , it's about LED DISPLAY MAX7219?
@MrElectroUino
@MrElectroUino 3 года назад
Will make a video on max7219
@stephentangerine3779
@stephentangerine3779 3 года назад
@@MrElectroUino Great , i will appreciate that
@saffanhal-turki6522
@saffanhal-turki6522 4 года назад
Q: does the sensor works if pointed upwards ?
@MrElectroUino
@MrElectroUino 4 года назад
Yes its work but you have to change the sensor direction in upwards.
@tanushreebiswas5141
@tanushreebiswas5141 4 года назад
I am doing the same thing with one led light, so when the sensor will find a object placed within less than 10 cm then it will turn on the light bt when i am connecting the circuit the led is glowing and when i am putting a object in front of the sensor the led is turned off why? But i have distance written "if(distance
@MrElectroUino
@MrElectroUino 4 года назад
Could you send me your code So First I have to check it.
@jomfawad9255
@jomfawad9255 Месяц назад
does it work outdoor if theres sunlight?
@sathishkumar-fp1qn
@sathishkumar-fp1qn Год назад
Fantastic bro
@MrElectroUino
@MrElectroUino Год назад
I'm glad you like it 😊❤️❤️
@lexjuris432
@lexjuris432 Год назад
Can you put it a lcd display to show the results on screen
@terryroe2023
@terryroe2023 4 года назад
What colour and size LEDs did you use? What was their voltage? How easy to add arduino speaker module into this project?
@MrElectroUino
@MrElectroUino 4 года назад
5mm size and Round Red, Green, Blue, Yellow, White Color. It requires 2 to 3V dc power supply. For more information and buy visit this link: www.banggood.in/custlink/m3vD4vsnhu For the speaker connection, connect a positive terminal of speaker to Arduino pin 11 and negative terminal to Arduino pin ground(GND) and update the code and upload it. #subscribe it for more video...... if you getting any problem you can also contact me on Instagram: instagram.com/_mr_electrouino_/?igshid=isb2pw365odq
@terryroe2023
@terryroe2023 4 года назад
@@MrElectroUino I only asked as I am currently ordering the parts to build one. I am going to use it as an ITC device if I can.
@MrElectroUino
@MrElectroUino 4 года назад
Okk First tell me what is the meaning of ITC device
@terryroe2023
@terryroe2023 4 года назад
@@MrElectroUino its a device that can interact with spirits. I chase EVP, Electronic Voice Phenomenon, ITC is Instrumental Trans-Communication. I recently built a Rem Pod too.
@MrElectroUino
@MrElectroUino 4 года назад
Watch this video:- ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-setjiVH0_IY.html
@indibro1909
@indibro1909 4 года назад
You bro very good.
@MrElectroUino
@MrElectroUino 4 года назад
Thanks for watching.
@asiyaabbas5280
@asiyaabbas5280 3 года назад
Mashallah keep it up
@MrElectroUino
@MrElectroUino 3 года назад
Thank you so much💖💙.
@allenmaupin
@allenmaupin 3 года назад
good job...
@MrElectroUino
@MrElectroUino 3 года назад
Thanks bro💖 Keep support keep share 😊😊😁
@justkamil8004
@justkamil8004 3 года назад
I just need it so when you go close up, It'll have a red light, and when the sensor senses nothing, it has a green light. Can you tell me how to do that, please?
@MrElectroUino
@MrElectroUino 3 года назад
Just set the distance for leds. when to off and on.
@abbassayed3471
@abbassayed3471 5 лет назад
Nice video 😎😎😀
@MrElectroUino
@MrElectroUino 5 лет назад
Thanks
@nikolaskupnjak7248
@nikolaskupnjak7248 3 года назад
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@MrElectroUino
@MrElectroUino 3 года назад
My pleasure😊😊
@MrBomer213
@MrBomer213 4 года назад
Great video 🤓🤓 I have a question, why did you divide by 28.5 ??
@MrElectroUino
@MrElectroUino 4 года назад
For getting the distance in cm. Thanks for watching...💖😎
@alirazasultanpuri1651
@alirazasultanpuri1651 4 года назад
Very very good
@MrElectroUino
@MrElectroUino 4 года назад
Thanks
@joseramonsalgadobetanzos9846
@joseramonsalgadobetanzos9846 2 года назад
Hello, nice video. I am from Mexico, I would like to know the code of the project with the buzzer and the LEDs
@MrElectroUino
@MrElectroUino 2 года назад
Ohh Thanks. Can you send me the email address.
@hammadkhan2926
@hammadkhan2926 3 года назад
Can you tell me the abstract and future enhancement of 2nd project?
@MrElectroUino
@MrElectroUino 3 года назад
2 project?
@hammadkhan2926
@hammadkhan2926 3 года назад
I mean distance measure with glowing LED
@MrElectroUino
@MrElectroUino 3 года назад
Yes
@MrElectroUino
@MrElectroUino 3 года назад
@@hammadkhan2926 Send your gmail id.
@hammadkhan2926
@hammadkhan2926 3 года назад
hammadkh789@gmail.com
@hammadkhan2926
@hammadkhan2926 3 года назад
Should I do coding first on arduino? or make the complete circuit then do coding on arduino
@MrElectroUino
@MrElectroUino 3 года назад
Make the circuit and upload the code.
@maplexd2829
@maplexd2829 2 года назад
2:14 I have an error shows "duration" was not declared in this scope. May I know what's the problem?
@MrElectroUino
@MrElectroUino 2 года назад
Plz copy full code from the link.
@aryanbiswal9735
@aryanbiswal9735 Год назад
Hi brother Its a very good project. But I want to do some modification like I want to add two sensor and differnt light for another sensor. Can u pls help me out. I would really appreciate it. Again thanks for the idea and I also subscribed to ur channel
@MrElectroUino
@MrElectroUino Год назад
The same way you can do it. Just duplicate the code and change the pin defination.
@prov8570
@prov8570 3 года назад
i have a doubt what is the range 9600 is that mean the range of the serial monitor that can tally?
@MrElectroUino
@MrElectroUino 3 года назад
Yes it's use for serial monitor to communicate with arduino uno.
@nurfatninsahnun4326
@nurfatninsahnun4326 2 года назад
Why when it come to hardware, my led become dim?
@timc3517
@timc3517 2 года назад
спасибо!!!
@MrElectroUino
@MrElectroUino 2 года назад
Не за что ☺️
@midheaelah
@midheaelah Месяц назад
legend
@livinsebi3692
@livinsebi3692 2 года назад
Sir i have a doubt Can i use arduino nano instead of uno?? Isn't both same??? Does this same code works on nano also???
@MrElectroUino
@MrElectroUino 2 года назад
Yes it will work same for arduino nano.
@santosharu3577
@santosharu3577 Год назад
Nice. How to control water tank level with motor output.
@MrElectroUino
@MrElectroUino Год назад
Hii, The same way you can use it as water level indicator.
@ButtLoadOfChicken
@ButtLoadOfChicken 9 месяцев назад
I have a wired buzzer, how do i connect it to the arduino (for breadboard etc)
@ButtLoadOfChicken
@ButtLoadOfChicken 9 месяцев назад
I only have 6 led, i removed the last one
@howidamostafa8789
@howidamostafa8789 4 года назад
when i do the first part without led the distance = 0 why ?
@MrElectroUino
@MrElectroUino 4 года назад
I think your ultrasonic sensor is not working.
@SHARWINXAVIERRIT
@SHARWINXAVIERRIT 4 года назад
can we do the same without resistors?
@MrElectroUino
@MrElectroUino 4 года назад
Yes, you can do that, but the resistor is used for protecting the LEDs. Without a resistor, the LED draws too much current and burns out. You can easily found a resistor in some old electronics components but make sure the values and don't forget to subscribe to my channel✔💙
@muhammadkelvinn4871
@muhammadkelvinn4871 3 года назад
Mantep banget deh video nya
@MrElectroUino
@MrElectroUino 3 года назад
Terima kasih
@haneesha_shaik
@haneesha_shaik 3 года назад
Can u add code for both parts in description, which would help better and y is buzzer used
@MrElectroUino
@MrElectroUino 3 года назад
Kindly check the description for code link.
@kemaketseforkssebitiela3089
@kemaketseforkssebitiela3089 7 месяцев назад
Too good but the problem is the last part of your code for leds passes quickly moreover "upload the code" those words causes obstruction i can see clearly. Where can i get clean code?
@SomethingIdk-rp9ew
@SomethingIdk-rp9ew 3 месяца назад
yyeeesss thank uuuuu
@SomethingIdk-rp9ew
@SomethingIdk-rp9ew 3 месяца назад
FOUND IT
@SomethingIdk-rp9ew
@SomethingIdk-rp9ew 3 месяца назад
const int trig = 12; const int echo = 13; const int LED1 = 8; const int LED2 = 7; const int LED3 = 6; const int LED4 = 5; const int LED5 = 4; const int LED6 = 3; const int LED7 = 2; int duration = 0; int distance = 0; void setup() { pinMode(trig , OUTPUT); pinMode(echo , INPUT); pinMode(LED1 , OUTPUT); pinMode(LED2 , OUTPUT); pinMode(LED3 , OUTPUT); pinMode(LED4 , OUTPUT); pinMode(LED5 , OUTPUT); pinMode(LED6 , OUTPUT); pinMode(LED7 , OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(trig , HIGH); delayMicroseconds(1000); digitalWrite(trig , LOW); duration = pulseIn(echo , HIGH); distance = (duration/2) / 28.5 ; Serial.println(distance); if ( distance
@mikemumbo7317
@mikemumbo7317 4 года назад
Is there anyone here getting this error code here? Arduino: 1.8.13 (Windows 7), Board: "Arduino Uno" Sketch uses 3234 bytes (10%) of program storage space. Maximum is 32256 bytes. Global variables use 190 bytes (9%) of dynamic memory, leaving 1858 bytes for local variables. Maximum is 2048 bytes. An error occurred while uploading the sketch avrdude: ser_open(): can't open device "\\.\COM3": Access is denied.
@MrElectroUino
@MrElectroUino 4 года назад
The first step is to verify the Uno is presented on COM3. Remove the Uno. Start Device Manager. What serial ports are listed? Insert the Uno. Wait a few seconds. What serial ports are listed?
@user-dn5ul4pe4t
@user-dn5ul4pe4t Год назад
how could i reeplace the leds with a 7 segment display?
@MrElectroUino
@MrElectroUino Год назад
Hello 👋 If you want to connect the lcd then check out my website. I already made a tutorial on it.
@DailyDeepFacts1_
@DailyDeepFacts1_ 3 года назад
I finished the code and uploaded but what app do you use to chck the sensor? the same as the coding app?
@MrElectroUino
@MrElectroUino 3 года назад
Same arduino IDE used to check the sensor value. For that Goto and click on serial monitor Don't forget to subscribe💖✌
@saumitrachaubey7935
@saumitrachaubey7935 Год назад
I also want to add that LCD distance showing screen with this LED light structure can u help me with that
@MrElectroUino
@MrElectroUino Год назад
I already written a blog on this topic. So check out my website for code.
@NenesHusbandNo
@NenesHusbandNo 4 месяца назад
Hellooo, I hope you'll notice this comment. I was wondering why my components are blinking when I copied your code, but in the video it isn't. Have I done something wrong? Your reply would be greatly appreciated ^-^
@MrElectroUino
@MrElectroUino 4 месяца назад
Can you send the serial monitor, I think your sensor might not work. I need more information to point out the issue. Contact me on instagram _mr_electrouino
@rogelioquino5075
@rogelioquino5075 2 месяца назад
Can i have the code
@TechnicalidEas07
@TechnicalidEas07 4 года назад
#Mst
@MrElectroUino
@MrElectroUino 4 года назад
thanks bro 💙💙 Don't forget to subscribe✔✔
@know1844
@know1844 2 года назад
Bro please tell does the sensor tells the object distance present in water if the sensor is projected upward the water and object is in water. Please reply
@MrElectroUino
@MrElectroUino 2 года назад
Yes, It will detect the water level.
@PathwaytoEngineeringDegree
@PathwaytoEngineeringDegree 3 года назад
Can I get the full code to this project please, thanks!
@MrElectroUino
@MrElectroUino 3 года назад
Check the description for code☺.
@elhassanelaroui9258
@elhassanelaroui9258 2 года назад
@@MrElectroUino sv p code
@saptarshisinha4767
@saptarshisinha4767 Год назад
What is the resistance of the resistors?
@MrElectroUino
@MrElectroUino Год назад
It's a 220ohm resistor.
@calebterrill9014
@calebterrill9014 3 года назад
i keep getting zero for distance even though the wiring and coding is the same :( is my sensor broken???
@MrElectroUino
@MrElectroUino 3 года назад
Maybe your sensor is broken or you did some thing wrong.
@muhammadzaid532
@muhammadzaid532 4 года назад
what if we dont use resistors? cz i dont have resistors
@MrElectroUino
@MrElectroUino 4 года назад
Hey there, Resistor is use for protecting the leds.Without resistor the LED draws too much current and burns out. You can easy found a resistor in some old electronics component but make sure the values.
@AvighnaDaruka
@AvighnaDaruka 2 года назад
bro please help it isnt working for me, only 5 LEDS are working and its just stationary it isnt blinking. It is just on and not moving
@MrElectroUino
@MrElectroUino 2 года назад
Contact me on instagram: _mr_electrouino
@BossKiller01
@BossKiller01 3 года назад
Padu sia
@Yash_Verma5
@Yash_Verma5 2 года назад
Best in whole RU-vid i did it
@MrElectroUino
@MrElectroUino 2 года назад
Ohh thank you 💕💕
@Yash_Verma5
@Yash_Verma5 2 года назад
@@MrElectroUino 😋😋
@mihaighitun4409
@mihaighitun4409 4 года назад
Hi .In ur code the distance is messured in cm?
@MrElectroUino
@MrElectroUino 4 года назад
yes👍
@MegaYuas
@MegaYuas 3 года назад
subscribed this channel due to working code and hope in future error free coding will be provided.
@MrElectroUino
@MrElectroUino 3 года назад
Thanks l will😊😊💖
@rajdeep.saha_
@rajdeep.saha_ 3 года назад
in my serial monitor only "0" i bing diplayed repeatedly. What to do?
@MrElectroUino
@MrElectroUino 3 года назад
Maybe your sensor is broken or you did some thing wrong. Check your circuit again.
@muhammadnajmi865
@muhammadnajmi865 4 года назад
I want to ask why you put it on 13 and 12 pin and not in analog pin
@MrElectroUino
@MrElectroUino 4 года назад
That's because the echo pin of HC-SR04 receives a pulse of very short duration,a pulse that has a value of 5v. Its not possible to get a pulse with analog pin.
@muhammadnasiruddinkn9473
@muhammadnasiruddinkn9473 3 года назад
ouh useful video. But how do i use this project with photoresistor?
@MrElectroUino
@MrElectroUino 3 года назад
Bro it's not possible with phtoresistor.
@saptarshisinha4767
@saptarshisinha4767 Год назад
Can you give the code for per distance 30 cm... please...means the led will glow after every 30 cm
@MrElectroUino
@MrElectroUino Год назад
For that just set the if statement to distance > 30.
@saptarshisinha4767
@saptarshisinha4767 Год назад
@@MrElectroUino you mean if ( distance
@Joshi_aarya
@Joshi_aarya 3 года назад
Hello if I want to do the same thing using RaspberryPi and in python programming give me suggestions!!
@MrElectroUino
@MrElectroUino 3 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-L90WS-ptnvI.html Visit this link for get the distance of an object after that use if loop for comparing the distance and turn on/off the led.
@Joshi_aarya
@Joshi_aarya 3 года назад
@@MrElectroUino can u just explain me the code!
@MrElectroUino
@MrElectroUino 3 года назад
@@Joshi_aarya How can i do that. visit this link for understand the code. pimylifeup.com/raspberry-pi-distance-sensor/
@Joshi_aarya
@Joshi_aarya 3 года назад
@@MrElectroUino explain means just write it down!! Btw now I got it thank you so much 👍
@MrElectroUino
@MrElectroUino 3 года назад
@@Joshi_aarya My pleasure : )
@anelsuljkanovic334
@anelsuljkanovic334 3 года назад
how should be the circuit diagram and code?
@MrElectroUino
@MrElectroUino 3 года назад
Checkout the description you will find the code and circuit diagram link.
@Danishis4fun
@Danishis4fun 2 года назад
Able to do with piezo buzzer?
@MrElectroUino
@MrElectroUino 2 года назад
yes Its possible, if you want the code send me your Gmail address.
@sungpll7756
@sungpll7756 6 месяцев назад
Thank you for this video !! can you give me the coding and diagram for ultrasonic sensor led project? because i want use this as a guide for my final exam ..
@MrElectroUino
@MrElectroUino 6 месяцев назад
Hello, I’m glad to here it. For code, check out the video description.
@Yalmamri
@Yalmamri 2 месяца назад
It fails to upload what is the problem? + I can’t find the port COM5
@inspirasiiiii
@inspirasiiiii Год назад
maybe using rgb led saves some digitalPins ,becuz it can be green red blue or wahtever color in just one led
@MrElectroUino
@MrElectroUino Год назад
Yes you are right if you want to add more components else having multiple leds is good way to understand the distance between an object.
@narayanabaghar7363
@narayanabaghar7363 Год назад
I have done the same arrangement
@narayanabaghar7363
@narayanabaghar7363 Год назад
But all bulbs are not glowing
@MrElectroUino
@MrElectroUino Год назад
Make sure the you connect the led right and also change the jumper wire of that led.
@tendilvignesh1508
@tendilvignesh1508 3 года назад
Can I change tha digital pin for tha led
@MrElectroUino
@MrElectroUino 3 года назад
Yes you can but you have to define the pin in code to. DON'T FORGET TO SUBSCRIBE 💙💖
@asjadelahi581
@asjadelahi581 2 года назад
Can i get the programing it was not clear to me please🤗🤗i need it imidiatly...❤
Далее
Ultrasonic Sensor HC-SR04 and Arduino Tutorial
5:16
Просмотров 1,4 млн
arduino ultrasonic sensor projects | led project
4:11
Sensors - which one to use
17:06
Просмотров 1,3 млн