UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import unit
setScreenColor(0x222222)
extencoder_0 = unit.get(unit.EXT_ENCODER, unit.PORTA)
extencoder_0.init_i2c_address(0x59)
while True:
print((str('encoder:') + str((extencoder_0.get_encoder_value()))))
print((str('meter:') + str((extencoder_0.get_meter_value()))))
print((str('string meter') + str((extencoder_0.get_str_meter_value()))))
wait_ms(2)
extencoder_0.init_i2c_address(0x59)
extencoder_0.set_i2c_address(0x59)
extencoder_0.reset_encoder()
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)
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())