import sr04
from utime import sleep
while 1:
dist=sr04.get_distance()
if dist>0:
print(dist,"cm")
else:
print("invalid distance")
sleep(0.3)
import sr04
from utime import sleep
while 1:
dist=sr04.get_distance()
if dist>0:
print(dist,"cm")
else:
print("invalid distance")
sleep(0.3)