pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Thermal

案例程序

获取传感器获取的物体中心位置温度和最高,最低温度

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

setScreenColor(0x111111)

hat_thermal_0 = hat.get(hat.MLX90640)

while True:
  print(hat_thermal_0.getCenterTmp())
  print(hat_thermal_0.getMaxTmp())
  print(hat_thermal_0.getMinTmp())
  wait_ms(2)

功能说明

hat_thermal_0.getCenterTmp()
  • uiflow_block_hat_thermal_get_center_temperature
hat_thermal_0.getMaxTmp()
  • uiflow_block_hat_thermal_get_max_temperature
hat_thermal_0.getMinTmp()
  • uiflow_block_hat_thermal_get_min_temperature
hat_thermal_0.getTmp(0, 0)
  • uiflow_block_hat_thermal_get_temperature
hat_thermal_0.setColorMaxTmp(35)
  • uiflow_block_hat_thermal_set_max_visible_temperature
hat_thermal_0.setColorMinTmp(24)
  • uiflow_block_hat_thermal_set_min_visible_temperature
hat_thermal_0.update(x=0, y=0, show=True, showCenter=True)
  • uiflow_block_hat_thermal_update
On This Page