UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import module
import time
setScreenColor(0x222222)
mode = None
base_x = module.get(module.BASE_X)
while True:
print((str('') + str((base_x.get_encoder(1)))))
base_x.set_mode(1, base_x.NORMAL_MODE)
base_x.set_motor_speed(1, 100)
wait(1)
print((str('') + str((base_x.get_encoder(1)))))
base_x.set_mode(1, base_x.POSITION_MODE)
base_x.set_position_pid_max_speed(1, 50)
base_x.set_position_point(1, 1000)
wait(1)
print((str('') + str((base_x.get_encoder(1)))))
base_x.set_mode(1, base_x.SPEED_MODE)
base_x.set_speed_point(1, 100)
wait(1)
wait_ms(2)
base_x.get_encoder(1)
base_x.get_speed_20ms(1)
base_x.run_ahead(1, 0)
base_x.set_encoder(1, 0)
base_x.set_mode(1, base_x.NORMAL_MODE)
base_x.set_motor_speed(1, 0)
base_x.set_position_pid_max_speed(1, 0)
base_x.set_position_point(1, 0)
base_x.set_servo_angle(1, 0)
base_x.set_servo_pulse(1, 0)
base_x.set_speed_point(1, 0)