void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(14, OUTPUT);
pinMode(26, INPUT);
}
void loop() {
digitalWrite(14, HIGH);
delay(120);
digitalWrite(14, LOW);
float a= pulseIn(26, HIGH);
long distance =(a*0.034)/2;
Serial.println(distance);
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}