UIFlow Guide
from m5stack import *
from m5stack_ui import *
from uiflow import *
import unit
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
flash_0 = unit.get(unit.FLASH_LIGHT, unit.PORTB)
extencoder_0 = unit.get(unit.EXT_ENCODER, unit.PORTA)
extencoder_0.init_i2c_address(0x59)
while True:
print(extencoder_0.get_encoder_value())
print(extencoder_0.get_meter_value())
print(extencoder_0.get_str_meter_value())
wait_ms(2)
extencoder_0.init_i2c_address(0x59)
print(extencoder_0.get_firmware_status())
print(extencoder_0.get_encoder_value())
print(extencoder_0.get_meter_value())
print(extencoder_0.get_perimeter_value())
print(extencoder_0.get_pulse_value())
print(extencoder_0.get_str_meter_value())
print(extencoder_0.get_zero_counter_value())
print(extencoder_0.get_z_trigger_mode())
extencoder_0.reset_encoder()
extencoder_0.set_i2c_address(0x59)
extencoder_0.set_perimeter_value(1000)
extencoder_0.set_pulse_value(1000)
extencoder_0.set_zero_counter_value(0)
extencoder_0.set_z_trigger_mode(0)