Welcome to Kerala Project Center.
Image: SparkFun HC-SR04 Ultrasonic-Sensor 13959-01a.jpg by SparkFun via Wikimedia Commons, CC BY 2.0
Judging distance to a wall or obstacle by eye is unreliable in tight spaces — garages, parking spots, or robot navigation all benefit from a precise, real-time distance reading.
This project uses an ultrasonic sensor to measure the time a sound pulse takes to bounce off a nearby object and return, converting that into an accurate distance reading shown live on an LCD, general-purpose enough for parking assistance, obstacle detection, or as a standalone measuring tool.
// Simplified ultrasonic distance tracker - Arduino #includeLiquidCrystal lcd(12, 11, 5, 4, 3, 2); #define TRIG 9 #define ECHO 10 long readDistanceCM() { digitalWrite(TRIG, LOW); delayMicroseconds(2); digitalWrite(TRIG, HIGH); delayMicroseconds(10); digitalWrite(TRIG, LOW); long duration = pulseIn(ECHO, HIGH); return duration * 0.034 / 2; } void setup() { pinMode(TRIG, OUTPUT); pinMode(ECHO, INPUT); lcd.begin(16, 2); } void loop() { long dist = readDistanceCM(); lcd.setCursor(0, 0); lcd.print("Distance: "); lcd.print(dist); lcd.print(" cm "); delay(300); }
Monday - Saturday: 9:00 AM - 5:00 PM
Sunday: Not Working
2nd Floor, Comptron Arcade, Kallattumukku,
Thiruvananthapuram, Kerala 695012
+91 9633118080