. SmartElectronicsDIY

Automatic Fire Detection Suppression System(Arduino Uno | Embedded + Safety System)

This system automatically detects fire using flame and smoke sensors and activates a water pump to suppress it. At the same time, it triggers an alarm and can send alerts (optional GSM/IoT).

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Smart Arduino-Based Glasses for Blind

Project Purpose

Smart Arduino-Based Glasses for the Blind are an innovative wearable device designed to assist visually impaired individuals in navigating their surroundings safely. Unlike traditional walking sticks, these smart glasses detect obstacles at head level, helping users avoid hazards such as hanging objects, walls, or moving obstacles.

The system is built using the microcontroller Arduino Nano, which acts as the brain of the device. It is connected to ultrasonic sensors mounted on the front of the glasses. These sensors continuously measure the distance between the user and nearby objects by sending ultrasonic sound waves and receiving the reflected signals.

When an obstacle is detected within a predefined distance, the Arduino processes the data and immediately alerts the user through a small buzzer or vibration module attached to the frame. The alert intensity can vary depending on how close the object is, allowing the user to react quickly and safely.

The glasses are lightweight, portable, and designed for daily use. They can be powered by a small rechargeable battery, making them convenient and energy efficient. Additional features such as voice feedback, Bluetooth connectivity, or GPS navigation can also be integrated for enhanced functionality.

In conclusion, Smart Arduino-Based Glasses provide a modern, hands-free solution for visually impaired people. By combining sensors, electronics, and wearable design, this project enhances safety, independence, and confidence, helping users move freely in both indoor and outdoor environments.


๐Ÿ”ง Main Components Required

๐Ÿง  Controller

  1. Arduino Nano (recommended)

    • Small size, lightweight

    • Perfect for wearable projects
      (Arduino Uno can also be used for demo)


๐Ÿ“ก Sensors

  1. Ultrasonic Sensor – HC-SR04

    • Detects obstacles (2 cm – 400 cm)

    • Mounted on the front of glasses

(Optional advanced option)

  • VL53L0X ToF Distance Sensor (more accurate, smaller)


๐Ÿ”” Alert / Feedback System

  1. Buzzer (Active Buzzer)

    • Beeps faster as obstacle gets closer

  2. Vibration Motor (3V/5V)

    • Silent alert option (very useful for blind users)

(You can use buzzer OR vibration OR both)


๐Ÿ”Š Audio (Optional – Advanced)

  1. Mini Speaker

  2. DFPlayer Mini MP3 Module

    • Provides voice alerts like “Obstacle Ahead”


๐Ÿ”‹ Power Supply

  1. 3.7V Li-ion / Li-Po Battery

  2. TP4056 Charging Module (with protection)

  3. Boost Converter (MT3608) (if needed for 5V)


๐Ÿงฐ Supporting Components

  1. Resistors (220ฮฉ, 1kฮฉ)

  2. NPN Transistor (BC547 / 2N2222) – for vibration motor

  3. Diode (1N4007) – motor protection

  4. Slide Switch – power ON/OFF

  5. Jumper Wires

  6. Small Perf Board / PCB


๐Ÿ‘“ Mechanical

  1. Spectacles Frame (normal or 3D printed)

  2. Small Enclosure for Arduino & battery

  3. Cable ties / hot glue


⚙️ Optional Advanced Add-Ons

  • ESP32-CAM – object detection

  • Bluetooth Module (HC-05) – mobile voice output

  • GPS + GSM – emergency location alerts


๐Ÿ“Š Component Summary Table

ComponentQuantity
Arduino Nano1
Ultrasonic Sensor HC-SR041
Buzzer1
Vibration Motor1
Li-ion Battery1
TP4056 Charger1
Switch1
Transistor + Diode1 set
Jumper WiresAs required

 

Smart Blind Stick Using Arduino

 

๐Ÿ“Œ Introduction

A Smart Blind Stick using Arduino is an innovative assistive device designed to help visually impaired people walk safely and independently. Traditional white canes only detect obstacles when they touch them, but a smart stick can sense objects from a distance and alert the user in advance.


This project is based on the popular microcontroller board Arduino Uno, which controls the entire system. The stick is equipped with an ultrasonic sensor that continuously measures the distance between the user and nearby obstacles. When an object is detected within a certain range, the system alerts the user using a buzzer or vibration motor.

The working principle is simple: the ultrasonic sensor sends high-frequency sound waves, which reflect back after hitting an obstacle. The Arduino calculates the time taken for the echo to return and converts it into distance. If the distance is below a set threshold, the buzzer starts beeping faster or the motor vibrates more strongly, warning the user about the obstacle.

This smart device is lightweight, portable, and cost-effective, making it suitable for real-life use. It can also be upgraded with additional features like GPS tracking, water detection, and voice alerts for better functionality.

In conclusion, the Smart Blind Stick using Arduino is a practical and life-changing project. It combines electronics and innovation to improve the mobility, safety, and confidence of visually impaired individuals, making their daily lives easier and more independent.


๐ŸŽฏ Objectives

  • Detect obstacles in front of the user

  • Alert using sound or vibration

  • Improve mobility and safety for blind people


๐Ÿงฐ Components Required

ComponentQuantity
Arduino UNO1
Ultrasonic Sensor (HC-SR04)1
Buzzer1
Vibration Motor (optional)1
Battery (9V or power bank)1
Jumper WiresAs needed
Stick (PVC pipe or walking stick)1
Breadboard1

⚙️ Working Principle

  1. The ultrasonic sensor sends sound waves.

  2. The waves reflect back from nearby objects.

  3. Arduino calculates the distance.

  4. If the object is near:

    • Buzzer beeps faster

    • Vibration motor vibrates

  5. If no obstacle → no alert


๐Ÿ”Œ Circuit Connections

Ultrasonic Sensor → Arduino

  • VCC → 5V

  • GND → GND

  • Trig → Pin 9

  • Echo → Pin 10

Buzzer

  • Positive → Pin 6

  • Negative → GND

Vibration Motor (optional)

  • Positive → Pin 7

  • Negative → GND


๐Ÿ’ป Arduino Code

#define trigPin 9
#define echoPin 10
#define buzzer 6
#define motor 7

long duration;
int distance;

void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(motor, OUTPUT);
Serial.begin(9600);
}

void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;

Serial.print("Distance: ");
Serial.println(distance);

if (distance < 100 && distance > 50) {
tone(buzzer, 500);
digitalWrite(motor, HIGH);
delay(300);
noTone(buzzer);
digitalWrite(motor, LOW);
delay(300);
}
else if (distance <= 50) {
tone(buzzer, 1000);
digitalWrite(motor, HIGH);
}
else {
noTone(buzzer);
digitalWrite(motor, LOW);
}

delay(100);
}

๐Ÿง  Block Diagram

Ultrasonic Sensor → Arduino → Buzzer
→ Vibration Motor
→ Serial Monitor

Prevention of Railway Accidents Using Arduino Uno

 Railway transportation is one of the most widely used and economical modes of travel, especially in countries like India. However, railway accidents caused by track damage, human error, or obstacles on the track can lead to serious loss of life and property. To address this issue, a smart safety system based on the Arduino Uno can be implemented to detect potential hazards and prevent accidents before they occur.




The proposed system uses sensors such as infrared (IR) sensors and ultrasonic sensors to monitor the condition of railway tracks and detect any obstacles. IR sensors are placed along the track to identify cracks or discontinuities, while the ultrasonic sensor measures the distance of any object present on the track. When a fault or obstacle is detected, the Arduino Uno processes the data and immediately activates a buzzer and warning lights to alert nearby personnel.

In addition to local alerts, the system can be integrated with a GSM module to send real-time notifications to railway authorities, allowing for quick action. A relay module is also used to automatically stop the train motor in case of danger, preventing collisions or derailments.

This Arduino-based solution is cost-effective, reliable, and easy to implement. It reduces human dependency and enhances railway safety through automation and real-time monitoring. With further improvements such as GPS tracking and IoT connectivity, this system can play a significant role in modernizing railway safety infrastructure and saving lives.


Introduction

Railway accidents often happen due to:

  • Track cracks

  • Collisions between trains

  • Human errors

  • Obstacles on track

This project uses an Arduino Uno–based smart safety system that can:

  • Detect cracks in railway tracks

  • Detect obstacles on track

  • Automatically alert railway control room

  • Stop train to avoid accidents


๐ŸŽฏ 2. Objective

To design a low-cost smart railway safety system using Arduino that can:

  • Detect track damage

  • Detect obstacles

  • Send alerts

  • Prevent train collision


⚙️ 3. Components Required

ComponentQuantity
Arduino Uno1
Ultrasonic Sensor (HC-SR04)1
IR Sensor Module2
Buzzer1
LED (Red + Green)2
GSM Module (SIM800L/900A)1
Relay Module1
DC Motor (Train simulation)1
Battery / Power Supply1
Connecting wiresAs required
Breadboard1

๐Ÿง  4. System Working Principle

๐Ÿ” A. Track Crack Detection

  • IR sensors are placed along the railway track.

  • If a crack occurs, the IR signal breaks.

  • Arduino detects this and sends an alert.

๐Ÿšง B. Obstacle Detection

  • Ultrasonic sensor detects objects on track.

  • If distance < threshold (e.g., 20 cm), it triggers alarm.

๐Ÿ“ก C. Alert System

  • GSM module sends SMS to railway authority.

  • Buzzer + Red LED alerts nearby people.

๐Ÿ›‘ D. Automatic Train Stop

  • Relay cuts off motor power (train stops).


๐Ÿ”Œ 5. Block Diagram

IR Sensors ─┐
├──> Arduino Uno ───> Relay ──> Motor (Train)
Ultrasonic ─┘ │
├──> GSM Module (SMS Alert)
├──> Buzzer
└──> LED Indicator

๐Ÿ”— 6. Circuit Connections

Ultrasonic Sensor (HC-SR04)

  • VCC → 5V

  • GND → GND

  • Trig → Pin 9

  • Echo → Pin 10

IR Sensors

  • Output → Pin 2 and Pin 3

Relay Module

  • IN → Pin 7

Buzzer

    • → Pin 6

LEDs

  • Red → Pin 4

  • Green → Pin 5

GSM Module

  • TX → Pin 11

  • RX → Pin 12


๐Ÿ’ป 7. Arduino Code

#define trigPin 9
#define echoPin 10
#define ir1 2
#define ir2 3
#define buzzer 6
#define relay 7
#define redLED 4
#define greenLED 5

long duration;
int distance;

void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(ir1, INPUT);
pinMode(ir2, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(relay, OUTPUT);
pinMode(redLED, OUTPUT);
pinMode(greenLED, OUTPUT);

Serial.begin(9600);

digitalWrite(relay, HIGH); // motor ON
digitalWrite(greenLED, HIGH);
}

void loop() {

// Ultrasonic distance
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;

int crack1 = digitalRead(ir1);
int crack2 = digitalRead(ir2);

if (distance < 20 || crack1 == LOW || crack2 == LOW) {

digitalWrite(buzzer, HIGH);
digitalWrite(redLED, HIGH);
digitalWrite(greenLED, LOW);
digitalWrite(relay, LOW); // Stop train

Serial.println("ALERT! Track Damage or Obstacle Detected");

} else {
digitalWrite(buzzer, LOW);
digitalWrite(redLED, LOW);
digitalWrite(greenLED, HIGH);
digitalWrite(relay, HIGH); // Train running
}

delay(500);
}

๐Ÿ“ฒ 8. GSM Alert Message Example

When fault occurs, system sends SMS like:

ALERT!
Track Crack or Obstacle Detected
Location: Track Section A12

๐Ÿ“Š 9. Advantages

✔ Prevents railway accidents
✔ Low cost system
✔ Automatic detection
✔ Real-time alert system
✔ Easy to install


SMART TEMPERATURE & HUMIDITY MONITORING SYSTEM

LCD + IoT (ESP32) + SD Card + Buzzer Alert






๐Ÿง  Controller Used

ESP32 (Wi-Fi built-in, best choice)


๐Ÿ”ง COMPONENTS

  • ESP32 Dev Module

  • DHT22 (or DHT11)

  • 16×2 LCD with I2C module

  • SD Card Module + SD Card

  • Buzzer

  • 10kฮฉ resistor

  • Jumper wires


๐Ÿ”Œ CONNECTION DIAGRAM (PIN MAPPING)

๐ŸŒก️ DHT22

DHT22 ESP32 ------------------ VCC -----> 3.3V DATA -----> GPIO 4 GND -----> GND (10kฮฉ between VCC & DATA)

๐Ÿ“Ÿ LCD 16×2 (I2C)

LCD (I2C) ESP32 ------------------ VCC -----> 5V GND -----> GND SDA -----> GPIO 21 SCL -----> GPIO 22

๐Ÿ“Š SD Card Module (SPI)

SD MODULE ESP32 ------------------ CS -----> GPIO 5 MOSI -----> GPIO 23 MISO -----> GPIO 19 SCK -----> GPIO 18 VCC -----> 5V GND -----> GND

๐Ÿ”” BUZZER

Buzzer + ----> GPIO 15 Buzzer - ----> GND

⚙️ WORKING

  1. DHT reads temperature & humidity

  2. LCD displays live values

  3. Data stored in SD card (CSV file)

  4. ESP32 sends data to cloud (ThingSpeak)

  5. Buzzer alerts if limit crossed


๐Ÿ”” ALERT LIMITS

  • Temperature > 35°C

  • Humidity > 80%


๐Ÿ’ป FULL ESP32 CODE (READY TO UPLOAD)

#include <DHT.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> #include <SPI.h> #include <SD.h> #include <WiFi.h> #include <HTTPClient.h> // ----------- SETTINGS ------------- #define DHTPIN 4 #define DHTTYPE DHT22 #define BUZZER 15 #define SD_CS 5 LiquidCrystal_I2C lcd(0x27, 16, 2); DHT dht(DHTPIN, DHTTYPE); // WiFi details const char* ssid = "YOUR_WIFI_NAME"; const char* password = "YOUR_WIFI_PASSWORD"; // ThingSpeak String apiKey = "YOUR_THINGSPEAK_API_KEY"; void setup() { Serial.begin(9600); pinMode(BUZZER, OUTPUT); digitalWrite(BUZZER, LOW); lcd.init(); lcd.backlight(); dht.begin(); // SD Card if (!SD.begin(SD_CS)) { lcd.setCursor(0,0); lcd.print("SD Fail!"); } // WiFi WiFi.begin(ssid, password); lcd.setCursor(0,0); lcd.print("Connecting..."); while (WiFi.status() != WL_CONNECTED) { delay(500); } lcd.clear(); } void loop() { float humidity = dht.readHumidity(); float temperature = dht.readTemperature(); if (isnan(humidity) || isnan(temperature)) { return; } // LCD Display lcd.setCursor(0,0); lcd.print("Temp: "); lcd.print(temperature); lcd.print(" C"); lcd.setCursor(0,1); lcd.print("Hum : "); lcd.print(humidity); lcd.print(" %"); // Buzzer Alert if (temperature > 35 || humidity > 80) { digitalWrite(BUZZER, HIGH); } else { digitalWrite(BUZZER, LOW); } // SD Card Logging File dataFile = SD.open("/data.csv", FILE_APPEND); if (dataFile) { dataFile.print(temperature); dataFile.print(","); dataFile.println(humidity); dataFile.close(); } // ThingSpeak Upload if (WiFi.status() == WL_CONNECTED) { HTTPClient http; String url = "http://api.thingspeak.com/update?api_key=" + apiKey + "&field1=" + String(temperature) + "&field2=" + String(humidity); http.begin(url); http.GET(); http.end(); } delay(20000); }

๐Ÿ“Š SD CARD FILE (data.csv)

Temperature,Humidity 30.5,60 31.2,62

(Open in Excel ๐Ÿ“ˆ)


๐Ÿ“Ÿ LCD OUTPUT

Temp: 30.5 C Hum : 60 %

๐ŸŽ“ PROJECT USE

  • Final year project

  • Smart weather station

  • Greenhouse monitoring

  • Server room alert system

ARDUINO-BASED AUTOMATIC WATERING SYSTEM

 An Arduino-based automatic watering system is a smart solution designed to provide water to plants automatically based on their actual needs. In traditional watering methods, plants are often overwatered or underwatered due to lack of monitoring and human error. This not only affects plant growth but also leads to unnecessary water wastage.




1. Block Diagram Explanation

Main Blocks:

  1. Soil Moisture Sensor

    • Measures the moisture level present in the soil

    • Sends analog signal to Arduino

  2. Arduino Uno/Nano

    • Acts as the brain of the system

    • Reads sensor data and makes decisions

  3. Relay Module

    • Works as an electronic switch

    • Turns the water pump ON or OFF safely

  4. Water Pump / Solenoid Valve

    • Supplies water to plants when activated

  5. Power Supply

    • Provides power to Arduino and pump

Signal Flow:
Soil Moisture Sensor → Arduino → Relay → Water Pump


2. Working Principle

  • The soil moisture sensor continuously checks the moisture level of the soil.

  • The sensor sends an analog value to the Arduino.

  • Arduino compares this value with a predefined threshold.

  • If soil is dry:
    → Arduino activates the relay
    → Relay turns ON the water pump

  • If soil is wet enough:
    → Arduino deactivates the relay
    → Water pump turns OFF

This process runs automatically without human intervention, ensuring optimal watering and water conservation.


3. Components List

No.Component NameQuantity
1Arduino Uno / Nano1
2Soil Moisture Sensor Module1
3Relay Module (5V)1
4DC Water Pump / Solenoid Valve1
5Connecting Wires (Jumper wires)As required
6Power Supply (5V & 12V)1
7Water PipeAs required

(Optional: LCD, LED indicator, buzzer)


4. Arduino Code (Automatic Watering System)

// Arduino Automatic Watering System int sensorPin = A0; // Soil moisture sensor pin int relayPin = 7; // Relay control pin int moistureValue = 0; int threshold = 500; // Adjust according to soil void setup() { pinMode(relayPin, OUTPUT); digitalWrite(relayPin, HIGH); // Relay OFF (active LOW) Serial.begin(9600); } void loop() { moistureValue = analogRead(sensorPin); Serial.print("Soil Moisture Value: "); Serial.println(moistureValue); if (moistureValue > threshold) { // Soil is dry digitalWrite(relayPin, LOW); // Pump ON Serial.println("Pump ON"); } else { // Soil is wet digitalWrite(relayPin, HIGH); // Pump OFF Serial.println("Pump OFF"); } delay(1000); // 1 second delay }

Arduino Human Following Robot Project

 

The Human Following Robot uses ultrasonic sensors to detect a person and automatically follows them while maintaining a safe distance. The robot moves forward, left, right, or stops based on human position.


๐Ÿ”ง Components Required

  • Arduino UNO

  • Ultrasonic Sensor HC-SR04 (1 or 2 sensors)

  • Motor Driver L298N

  • DC Motors × 2

  • Robot Chassis + Wheels

  • 12V Battery / Power Bank

  • Jumper Wires

  • Breadboard

(Optional: IR sensors for better accuracy)


⚙️ Working Principle

  1. Ultrasonic sensor emits ultrasonic waves.

  2. Waves reflect from the human body.

  3. Arduino calculates distance.

  4. Based on distance:

    • Too far → Move Forward

    • Too close → Stop

    • Left detected → Turn Left

    • Right detected → Turn Right


๐Ÿ“ Distance Formula

Distance (cm) = (Time × 0.034) / 2

๐Ÿ”Œ Circuit Connections

HC-SR04 → Arduino

HC-SR04Arduino
VCC5V
TrigD9
EchoD10
GNDGND

L298N Motor Driver → Arduino

L298N PinArduino
IN1D2
IN2D3
IN3D4
IN4D5
ENA5V
ENB5V
GNDGND

๐Ÿ’ป Arduino Code

#define trigPin 9 #define echoPin 10 #define IN1 2 #define IN2 3 #define IN3 4 #define IN4 5 long duration; int distance; void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = duration * 0.034 / 2; Serial.println(distance); if (distance > 20 && distance < 60) { moveForward(); } else if (distance <= 20) { stopRobot(); } else { stopRobot(); } } void moveForward() { digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); } void stopRobot() { digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW); }

๐Ÿ“Š Output Behavior

DistanceRobot Action
> 60 cmStop
20–60 cmFollow Human
< 20 cmStop

๐Ÿš€ Applications

  • Assistant robots

  • Service robots

  • Surveillance robots

  • Smart shopping carts

  • Robotics learning projects

Arduino Distance Measurement Using Ultrasonic Sensor (HC-SR04) and LCD

 This project measures the distance of an object using the HC-SR04 ultrasonic sensor and displays the distance in centimeters on a 16×2 LCD. It works on the principle of ultrasonic sound wave reflection.




๐Ÿ”ง Components Required

  • Arduino UNO

  • Ultrasonic Sensor HC-SR04

  • 16×2 LCD

  • 10kฮฉ Potentiometer (for LCD contrast)

  • Breadboard

  • Jumper wires

  • USB cable


⚙️ Working Principle

  1. The Trigger pin sends an ultrasonic pulse.

  2. The pulse hits an object and reflects back.

  3. The Echo pin receives the reflected signal.

  4. Arduino calculates distance using time delay.

  5. Distance is displayed on the LCD.

๐Ÿ“ Distance Formula:

Distance (cm) = (Time × Speed of Sound) / 2 Speed of sound = 0.034 cm/ยตs

๐Ÿ”Œ Circuit Connections

HC-SR04 → Arduino

HC-SR04 PinArduino Pin
VCC5V
TrigD9
EchoD10
GNDGND

LCD → Arduino

LCD PinArduino Pin
RSD7
ED6
D4D5
D5D4
D6D3
D7D2
VSSGND
VDD5V
V0Potentiometer
RWGND

๐Ÿ’ป Arduino Code

#include <LiquidCrystal.h> LiquidCrystal lcd(7, 6, 5, 4, 3, 2); const int trigPin = 9; const int echoPin = 10; long duration; int distance; void setup() { lcd.begin(16, 2); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); lcd.print("Distance Meter"); delay(2000); lcd.clear(); } void loop() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = duration * 0.034 / 2; lcd.setCursor(0, 0); lcd.print("Distance:"); lcd.setCursor(0, 1); lcd.print(distance); lcd.print(" cm "); delay(500); }

๐Ÿ“Š Output

  • LCD displays real-time distance in centimeters

  • Measurement range: 2 cm to 400 cm

  • Accuracy: ±3 mm