pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Unit ToF

案例程序

from m5stack import *
from m5ui import *
from uiflow import *
import unit

setScreenColor(0x222222)
tof_0 = unit.get(unit.TOF, unit.PORTA)

while True:
  print(tof_0.distance)
  wait_ms(2)

功能说明

print(tof_0.distance)
  • 获取 Unit ToF 测量的距离
On This Page