UIFlow Guide
from m5stack import *
from m5stack_ui import *
from uiflow import *
import module
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
pps = module.get(module.PPS)
pps.init_i2c_address(0x35)
pps.setOutput(True)
pps.setOutputVoltage(5.5)
pps.setOutputCurrent(1)
while True:
print((str('output current:') + str((pps.readOutputCurrent()))))
print((str('output voltage:') + str((pps.readOutputVoltage()))))
print((str('MCU temperture:') + str((pps.readMcuTemperature()))))
wait_ms(2)
pps.getI2CAddress()
pps.init_i2c_address(0x35)
pps.readDataUpdateFlag()
pps.readInputVoltage()
pps.readMcuTemperature()
pps.readModuleId()
pps.readOutputCurrent()
pps.readOutputVoltage()
pps.readPsuRunningMode()
pps.readUID()
pps.setI2CAddress()
pps.setOutput(True)
pps.setOutputCurrent(1)
pps.setOutputVoltage(5.5)