pdf-icon

UIFlow 上手教程

UiFlow1 Blockly

Event

Unit

UiFlow1 项目配置

Unit NCIR

案例程序

测量感应红外温度

from m5stack import *
from m5stack_ui import *
from uiflow import *
import time
import unit

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
ncir_0 = unit.get(unit.NCIR, unit.PORTA)

while True:
  print((str('temperature:') + str((ncir_0.temperature))))
  wait(0.2)
  wait_ms(2)

功能说明

print((str('temperature:') + str((ncir_0.temperature))))
  • 获取设备感应的红外温度数据
On This Page