pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

coming soon

Yun

Example

Sets the light color to red and retrieves sensor data for temperature, humidity, and atmospheric pressure.

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)

API


  • Retrieves the brightness level of the Yun device.

  • Retrieves the humidity level from the Yun device.

  • Retrieves the atmospheric pressure from the Yun device.

  • Retrieves the temperature from the Yun device.

  • Sets the color of a specific LED on the Yun device.

  • Sets the color of all LEDs on the Yun device.
On This Page