pdf-icon

UIFlow 上手教程

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 项目配置

Unit Hall

案例程序

获取当前霍尔传感器状态

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

setScreenColor(0x222222)
hall_0 = unit.get(unit.HALL, unit.PORTA)

while True:
  print((str('hall:') + str((hall_0.value()))))
  wait_ms(2)

功能说明

print(hall_0.value())
  • 获取当前霍尔传感器状态
On This Page