UIFlow Guide
Retrieves and prints the distance value from the sensor.
from m5stack import *
from m5ui import *
from uiflow import *
import hat
setScreenColor(0x111111)
hat_tof_0 = hat.get(hat.TOF)
while True:
print(hat_tof_0.GetDistance())
wait_ms(2)
hat_tof_0.GetDistance()