UIFlow Guide
设置 puzzle_0 的亮度为 20,并持续显示设置矩阵颜色图案。
from m5stack import *
from m5ui import *
from uiflow import *
import unit
puzzle_0 = unit.get(unit.PUZZLE, unit.PORTA, 64)
puzzle_0.setBrightness(20)
while True:
puzzle_0.setColor(20, 0xff0000)
wait_ms(2)
puzzle_0.setColor(1, 0xff0000)
puzzle_0.setColorFrom(1, 5, 0xff0000)
puzzle_0.setColorAll(0xff0000)
puzzle_0.setBrightness(20)
puzzle_0.setShowLock(True)
puzzle_0.show()
puzzle_0.setColor(20, 0xff0000)
puzzle_0.setColor(20, 0xff0000)