UIFlow Guide
设置灯的颜色为红色,并获取传感器的温湿度和大气压力数值
from m5stack import *
from m5ui import *
from uiflow import *
import hat
setScreenColor(0x111111)
hat_yun_0 = hat.get(hat.YUN)
hat_yun_0.SetRGBAll(0xff0000)
while True:
print(hat_yun_0.temperature)
print(hat_yun_0.humidity)
print(hat_yun_0.pressure)
wait_ms(2)