UIFlow Guide
Control the balac to move forward, turn left or right, and move backward.
from m5stack import *
from m5ui import *
from uiflow import *
import time
import hat
setScreenColor(0x111111)
balac = hat.get(hat.BALAC)
balac.set_motor_speed(1, 50)
balac.set_motor_speed(2, 50)
wait(1)
balac.set_motor_speed(1, 50)
balac.set_motor_speed(2, 0)
wait(1)
balac.set_motor_speed(1, 0)
balac.set_motor_speed(2, 50)
wait(1)
balac.set_motor_speed(1, -50)
balac.set_motor_speed(2, -50)
wait(1)
balac.stop_motor(1)
wait(1)
balac.set_motor_speed(1, 50)
balac.stop_motor(1)