UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import module
import time
setScreenColor(0x111111)
label0 = M5TextBox(-7, -11, "STEPMOTOR Example", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
stepmotor1 = module.get(module.STEP_MOTOR, 0x70)
stepmotor1.set_mode("distance")
while True:
stepmotor1.turn(x=(-10), y=(-10), z=(-10), speed=300)
wait(2)
stepmotor1.turn(x=10, y=10, z=10, speed=300)
wait(2)
wait_ms(2)
stepmotor1.g_code('')
module.get(module.STEP_MOTOR, 0x70)
stepmotor1.lock_motor()
stepmotor1.turn(x=0, y=0, z=0, speed=0)
stepmotor1.set_mode("distance")
stepmotor1.unlock_motor()