pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Tof

案例程序

获取传感器获取的距离数值

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()
  • 获取距离数据
On This Page