UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
scales_0 = unit.get(unit.SCALES, unit.PORTA)
scales_0.write_rgb_led(25, 72, 26)
scales_0.write_button_offset(1)
while True:
print((str('weight:') + str(((scales_0.read_weight(0x14)/100) - -58344))))
print((str('button:') + str((scales_0.read_button_status(0x20)))))
wait(1)
wait_ms(2)
scales_0.init_i2c_address(0x26)
print(scales_0.read_button_status(0x20))
print(scales_0.read_rgb_led(False))
print(scales_0.read_weight(0x10))
print(scales_0.read_status(0xFE))
scales_0.write_offset(5000)
scales_0.write_soft_offset()
scales_0.write_button_offset(1)
scales_0.write_calibration_load(200)
scales_0.write_i2c_address(0x26)
scales_0.write_rgb_led(0, 0, 0)
scales_0.write_rgb_sync(0)
scales_0.write_calibration_zero()