pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

NCIR

案例程序

串口打印传感器数值

from m5stack import *
from m5ui import *
from uiflow import *
import hat
import hat

setScreenColor(0x111111)

hat_ncir_0 = hat.get(hat.NCIR)

while True:
  print(hat_ncir_0.temperature)
  wait_ms(2)

功能说明

hat_ncir_0.temperature
  • 从指定的红外温度传感器模块读取数据
On This Page