void setup(){
Serial.begin(9600);
pinMode(13, OUTPUT);
pinMode(12, INPUT);
pinMode(15, OUTPUT);
pinMode(14, OUTPUT);
}
void loop(){
int time;
int distance;
digitalWrite(13, LOW);
delay(100);
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13,LOW);
time=pulseIn(12,HIGH);
distance=time * 0.0346/2;
Serial.println(distance);
if (distance>100){digitalWrite(15, HIGH);}
else{digitalWrite(15, LOW);}
if(distance<100){digitalWrite(14, HIGH);}
else{digitalWrite(14, LOW);}
}