#include<LiquidCrystal.h>
const int trigpin-12;
const int echop-11;
const int rs-10;
const int en-9;
const int d4-7;
const int d5-6;
const int d6-5;
const int d7-4;
LiquidCrystal lcd(rs, en, d4,d5,d6,d7);
void setup(){
Icd.begin(16,2);
pinMode (trigpin, OUTPUT);
pinMode (echopin, INPUT);
lcd.print("ultrasonic sensor");
lcd.setCursor(0,1);
lcd.print("distance")
}
void loop(){
digitalWrite(trigpin, LOW);
delay(2000);
digitalWrite(trigpin, HIGH);
delay(3000);
digitalWrite(trigpin, LOW);
long duration -pulseIn(echopin, HIGH);
int distance-duration*0.05/2;
lcd.setCursor(10,1);
lcd.print(" ");
lcd.setCursor(10,1);
lcd.print(distance);
lcd.print("cm");
delay(500);
}