UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import module
import time
setScreenColor(0x000000)
relay2 = module.get(module.RELAY2)
relay2.init_i2c_address(0x25)
print((str('DEVICE VER:') + str((relay2.read_status(0xFE)))))
print((str('DEVICE I2C:') + str((relay2.read_status(0xFF)))))
while True:
relay2.write_relay_state(1, 0)
relay2.write_relay_state(2, 0)
wait(1)
relay2.write_relay_state(1, 1)
relay2.write_relay_state(2, 1)
wait(1)
wait_ms(2)
import module
relay2 = module.get(module.RELAY2)
relay2.init_i2c_address(0x25)
print(relay2.read_status(0xFE))
relay2.write_relay_state(1, 1)
print(relay2.read_relay_status(1))
relay2.write_i2c_address(0x25)