pdf-icon

UiFlow 使用教程

UiFlow1 开发指南

项目管理

使用 LTE 网络

UiFlow1 Blockly

Event

Unit

Hat 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