import machine
from machine import Pin
import time
T = Pin(23, Pin.OUT)
E = Pin(34, Pin.IN)
while True:
T.value(0)
time.sleep_us(1)
T.value(1)
time.sleep_us(10)
T.value(0)
Ttime = machine.time_pulse_us(E,1)
distance=(Ttime*0.03)/2
print(distance)
time.sleep(2)