English
English
简体中文
日本語

UiFlow Tutorial

UiFlow1 Development Guide

Project Management

Use LTE network

UiFlow1 Blockly

Event

Unit

Unit Mini BPS v1.1

Example

The program obtains atmospheric pressure and temperature

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

setScreenColor(0x222222)
bpsv11_0 = unit.get(unit.BPS_QMP, unit.PORTA)

while True:
  print((str('temperature:') + str((bpsv11_0.temperature))))
  print((str('pressure:') + str((bpsv11_0.pressure))))
  wait_ms(2)

API

print((str('pressure:') + str((bpsv11_0.pressure))))
  • Get Pressure value (Pa)
print((str('temperature:') + str((bpsv11_0.temperature))))
  • Obtain the temperature sensed by the device (° C)
Page Tools
PDF
On This Page