pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Mini Unit 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)
On This Page