UIFlow Guide
获取操纵杆的当前状态
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
joystick_0 = unit.get(unit.JOYSTICK, unit.PORTA)
while True:
print(joystick_0.X)
print(joystick_0.Y)
print(joystick_0.Press)
wait(0.2)
wait_ms(2)
print(joystick_0.Press)
print(joystick_0.InvertX)
print(joystick_0.InvertY)
print(joystick_0.X)
print(joystick_0.Y)