pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Unit Color

Example

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

setScreenColor(0x222222)
color_0 = unit.get(unit.COLOR, unit.PORTA)

while True:
  print((str('R:') + str(str((color_0.red)))))
  print((str('G:') + str(str((color_0.green)))))
  print((str('B:') + str(str((color_0.blue)))))
  wait_ms(2)

API

print(color_0.rawData)
  • get rawData
print(color_0.blue)
  • get Blue value
print(color_0.green)
  • get Green value
print(color_0.red)
  • get Red value
color_0.setGains(0x00)
  • set gain value
color_0.setIntegrationTime(0xFF)
  • set integration value
On This Page