UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
ext_io_0 = unit.get(unit.EXT_IO, unit.PORTA)
ext_io_0.setPortMode(ext_io_0.ALL_OUTPUT)
while True:
ext_io_0.digitWrite(1,0)
wait(0.2)
ext_io_0.digitWrite(2,0)
wait(0.2)
ext_io_0.digitWrite(3,0)
wait(0.2)
ext_io_0.digitWrite(4,0)
wait(0.2)
ext_io_0.digitWrite(1,1)
wait(0.2)
ext_io_0.digitWrite(2,1)
wait(0.2)
ext_io_0.digitWrite(3,1)
wait(0.2)
ext_io_0.digitWrite(4,1)
wait(0.2)
wait_ms(2)
print(ext_io_0.digitReadPort())
print(ext_io_0.digitRead(0))
ext_io_0.digitWrite(0,0)
ext_io_0.digitWritePort(0x68)
ext_io_0.setPinMode(0, ext_io_0.INPUT)
ext_io_0.setPortMode(ext_io_0.ALL_INPUT)