DISTANCE MEASURING DEVICE WITH ULTRASONIC SENSOR AND I2C LCD DISPLAY || DIY || REAL-TIME PROJECT
HTML-код
- Опубликовано: 4 окт 2024
- DISTANCE MEASURING DEVICE WITH ULTRASONIC SENSOR AND I2C LCD DISPLAY || DIY || REAL-TIME PROJECT
hey! guys, I came up with a new project distance measuring device for real-time projects.
the components required for this project.
Note: I have got a lot of comments regarding the code that it is not working, I have verified with different ultrasonic sensors, some of the sensors are not working properly and some sensors are working fine with accurate values. Please try with different sensors if it is not working.
1. Ultrasonic Sensor.
2. I2C LCD Display.
3. Arduino UNO.
4. USB cable.
5. jumper wires.
for more details about this project and source code and circuit please visit our blog at this link:
mkinventions.b...
**************************************************
BACKGROUND MUSIC IS DOWNLOADED FROM BEN SOUNDS:
www.bensound.com
*******Thanks for watching******
Hi everyone, I have verified with different ultrasonic sensors, some of the sensors are not working properly and some sensors are working fine with accurate values. Please try with different sensors if it is not working.
Those who doesn't work the code
Take this code it work with this montage
#include
LiquidCrystal_I2C lcd(0x27, 16, 2); // Adresse I2C 0x27 (du LCD DIYables), 16 colonnes et 2 lignes
int trigPin = A0; // Broche TRIG
int echoPin = A1; // Broche ECHO
float duration_us, distance_cm;
void setup() {
lcd.init(); // Initialisation de l'écran LCD
lcd.backlight(); // Activation du rétroéclairage
pinMode(trigPin, OUTPUT); // Configuration de la broche TRIG en mode sortie
pinMode(echoPin, INPUT); // Configuration de la broche ECHO en mode entrée
}
void loop() {
// Génère une impulsion de 10 microsecondes sur la broche TRIG
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Mesure la durée de l'impulsion depuis la broche ECHO
duration_us = pulseIn(echoPin, HIGH);
// Calcule la distance en centimètres
distance_cm = 0.017 * duration_us;
// Affiche la distance sur l'écran LCD
lcd.clear();
lcd.setCursor(0, 0); // Début de l'affichage à la première ligne
lcd.print("Distance: ");
lcd.print(distance_cm);
delay(500); // Attente de 500 ms
}
my man, thx for the video
THANK YOU SO MUCH, BRO, I HAD A PROJECT DEU TOMORROW I MADE SOME CHANGES IN THE CODE SO I WOULD SHOW MADE BY AND MY NAME
Sir, can we read Millimeter and micrometer- it is possible?
If, we read in micrometer scale, what is least count (Resolution) available?
Upload done. But All sections of lcd displaying erotically intead of text quote.
i've downloaded the library, how to include it in Arduino?
I cant get it to work on arduino nano
Thankyou, I can run the code. But need to do some installation libraries & some change.
It's not working
Need help
it does not showing any msg on lcd
1. You have to calibrate your LCD with screw driver you can find back side of the LCD display then you values will display clearly.
2. And once check the I2C address of of the LCD.
the code has error
in void setup
just replace lcd.init() by lcd.begin()
wowwww thankyouuuu ehehehehehehehhehe@@AmanKumar-gz4ih
Bro arduino uno price entha bro
What is that extra connected with lcd screen
i2c
bro ntg is printing on lcd
Please verify your I2C address of the lcd and then replace the address with your I2C lcd address
The code shows some errors while running
I will make a seperate video on this I will update the code and show the demo.
when?
@@MKinventionsMadhanChiruguri
Write the materials
it really didnt workkkk
BRO ITS NOT SHOWING THE DECIMAL PLACES. SHOWING ONLY ROUND FIG.
PLS MODIFY THE CODE WITH DECIMAL
wrong code
My LCD screen shows everything but the display is flickering
2 scenarios
1.pleas check the connections if you haven't connected properly the lcd display flickers.
2. If the battery voltage is low then some times it will flickers or some times it will not display.
remove lcd clear in void loop
unsubscribedd
code error dont trust this channel unsubscribe! waste of time!!!
Please check the code once again I will providing link please make sure if you not include the library It will show error.
mkinventions.blogspot.com/2020/07/distance-measuring-device-with.html?m=1
ok i will unsubscribe
fake😡
How you are saying this is fake. I have verified with different ultrasonic sensors, some of the sensors are not working properly and some sensors are working fine with accurate values. Please try with different sensors if it is not working.
fakeeee
Once again check the code