from machine import Pin, time_pulse_us
from time import sleep, sleep_us
Tring= Pin(1, Pin.OUT)
Echo= Pin(0, Pin.IN)
while True:
Tring.value(1)
sleep_us(2)
Tring.value(0)
sleep_us(10)
tempo= time_pulse_us(Echo, 1)
distância= tempo / 58
print("distância:", round(distância, 2))
sleep(1)