UIFlow Guide
Draw the M5Stack graph
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
oled_1 = unit.get(unit.OLED, unit.PORTA)
while True:
oled_1.fill(0x000000)
oled_1.show()
oled_1.text('Unit OLED Example', 0, 0, 0xffffff)
oled_1.show()
wait(5)
oled_1.fill(0x000000)
oled_1.show()
oled_1.image(25, 0, "/flash/img/m5stack.pbm")
oled_1.show()
wait(5)
wait_ms(2)
oled_0.fill(0xffffff)
oled_0.fill_rect(0, 0, 0, 0, 0xffffff)
oled_0.hline(0, 0, 0, 0xffffff)
oled_0.image(0, 0, "/flash/img/m5stack.pbm")
oled_0.invert(1)
oled_0.line(0, 0, 0, 0, 0xffffff)
oled_0.pixel(0, 0, 0xffffff)
oled_0.poweroff()
oled_0.poweron()
oled_0.rect(0, 0, 0, 0, 0xffffff)
oled_0.scroll(0, 0)
oled_0.show()
oled_0.text('', 0, 0, 0xffffff)
oled_0.vline(0, 0, 0, 0xffffff)