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)
encoder4_motor = module.get(module.ENCODER4MOTOR)
encoder4_motor.init_i2c_address(0x24)
encoder4_motor.set_all_motors_mode(0x00)
while True:
encoder4_motor.set_motor_pwm_dutycycle(0x00, (-127))
encoder4_motor.set_motor_pwm_dutycycle(0x01, 50)
encoder4_motor.set_motor_pwm_dutycycle(0x02, 95)
encoder4_motor.set_motor_pwm_dutycycle(0x03, 127)
print((str('Vin value:') + str((encoder4_motor.get_vin_current_int_value()))))
wait_ms(2)
encoder4_motor.get_device_spec(0xFE)
encoder4_motor.get_encoder_mode()
encoder4_motor.get_motor_encoder_value(0x00)
encoder4_motor.get_position_PID_value(0x00)
encoder4_motor.get_speed_PID_value(0x00)
encoder4_motor.get_motor_speed_value(0x00)
encoder4_motor.get_vin_adc_raw12_value()
encoder4_motor.get_vin_adc_raw8_value()
encoder4_motor.get_vin_current_float_value()
encoder4_motor.get_vin_current_int_value()
encoder4_motor.get_vin_voltage()
encoder4_motor.init_i2c_address(0x24)
encoder4_motor.set_encoder_mode(0x00)
encoder4_motor.set_i2c_address(0x24)
encoder4_motor.set_motor_mode(0x00, 0x00)
encoder4_motor.set_all_motors_mode(0x00)
encoder4_motor.set_motor_encoder_value(0x00, 1000)
encoder4_motor.set_position_encoder_value(0x00, 1000)
encoder4_motor.set_position_max_speed_value(0x00, 100)
encoder4_motor.set_position_PID_value(0x00, 3, 1, 15)
encoder4_motor.set_motor_pwm_dutycycle(0x00, 50)
encoder4_motor.set_speed_PID_value(0x00, 10, 1, 15)
encoder4_motor.set_speed_point_value(0x00, 50)