#define LED 5
#define ECHOPIN 18
#define TRIGPIN 19
void setup() {
Serial.begin(9600);
pinMode(ECHOPIN, INPUT);
pinMode(TRIGPIN, OUTPUT);
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(TRIGPIN, LOW);
delay(300);
digitalWrite(TRIGPIN, HIGH);
delay(300);
digitalWrite(TRIGPIN, LOW);
int distance = pulseIn(ECHOPIN,HIGH);
distance = distance/58;
Serial.println(distance);
  if(distance<=10)
  {
    digitalWrite(LED, HIGH);
    delay(1000);
    digitalWrite(LED, LOW);
    delay(1000);
  } 
}