UIFlow Guide
串口实时打印电位器的X,Y轴和按键值
from m5stack import *
from m5ui import *
from uiflow import *
import hat
setScreenColor(0x111111)
hat_Joystick_0 = hat.get(hat.JOYSTICK)
while True:
print(hat_Joystick_0.X)
print(hat_Joystick_0.Y)
print(hat_Joystick_0.Press)
wait_ms(2)
hat_Joystick_0.Press
hat_Joystick_0.InvertX
hat_Joystick_0.InvertY
hat_Joystick_0.X
hat_Joystick_0.Y