Ultrasonic sensor with code [Arduino nano project]

preview_player
Показать описание
Hello guys, In this tutorial we explained how to connect an Ultrasonic sensor to an Arduino nano board. Also, this ultrasonic sensor project is presented step by step.
short and sweet tutorial. Only from SriTu tech. If you think this video is good, don't forget to like and comment.

Ultrasonic sensor with code [Arduino nano project]

Ultrasonic sensor

***Names of material.
***step by step.
***Make it easy.

Our store with the best prices
========================================
========================================

( Source code and circuit diagram)
==========================================
==========================================

Part's List - (Our store -- SriTu Hobby)
==========================================
==========================================

Part's List (Amazon)
==========================================
==========================================

( Social media links )
==========================================
==========================================

Thanks for watching......................
If you learned something in this video,
**Like.
**Share.
**Subscribe.

What do you think please comment below? It's very important to create the next video.

#SriTu_Tech_arduino #arduino_projects #arduino_nano
Рекомендации по теме
Комментарии
Автор

This is the code:
void setup() {
pinMode(2, OUTPUT);//define arduino pin
pinMode(4, INPUT);//define arduino pin
Serial.begin(9600);//enable serial monitor

}
void loop() {
//pulse output
digitalWrite(2, LOW);
delayMicroseconds(4);
digitalWrite(2, HIGH);
delayMicroseconds(10);
digitalWrite(2, LOW);

long t = pulseIn(4, HIGH);//input pulse and save it veriable

long inches = t / 74 / 2; //time convert distance
long cm = t / 29 / 2; //time convert distance
String inch = " inches t";
String CM = " cm";

Serial.print(inches +inch);//print serial monitor inches
Serial.println(cm +CM);//print serial monitor cm
Serial.println();//print space
delay(100);//delay
}

EliteCatalustGaming
Автор

i love you man this i exactly what i was looking for

KaguneEdits
Автор

I habe a problem. When i upload the code it says "done uploading" without errors, but does not open the window with the name of the port.. what can i do? I m new with arduino

denisstefan
Автор

Does your sensor also reads max as 60cm? Even if distance is like 3-4m it says 65cm

Anton
Автор

Omg ! it worked
Thanx and proud of ur effort

legendprogrammesgames
Автор

thanks for this informational video @Srituhobby

aryanbhatt
Автор

Your screen was a bit blur
Any ways awesome video

legendprogrammesgames
Автор

Hi, need your help please. We can go on feverr if you want...

jamesdoukaga
Автор

Yo lo intento con un arruino nano pero no carga el codigo

holasoycj
Автор

Can u tell about whAT SHOULD BE THE BAUD when we open serial monitor

legendprogrammesgames
Автор

my serial monitor does'nt shows the distance and inches. It shows 0. So what should I do?

ichchatembe
Автор

Can u plz make a video on security alarm using buzzer module and ultrasonic

legendprogrammesgames
Автор

nice project. I cant find the code.... your block says error

greekghst
Автор

In serial moniter it is showing Please reply solution for it

shashankreddy
Автор

but how to make it ring when object is coming nearer

vedantneharkar
Автор

Sir the code has been not founded any solution

jcreative
Автор

I can't find the name of the port...what can I do

keerthanaa
Автор

I have tried doing this, its showing continuously 0 . so what should I do to get readings?

jaikiranr
Автор

Sir send me codes I can't find the code

rushikeshrakde