UIFlow Guide
Unit Gesture reads the gesture
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
gesture_0 = unit.get(unit.GESTURE, unit.PORTA)
gesture_0.begin()
gesture_0.set_gesture_highrate(True)
while True:
print(gesture_0.get_gesture())
print(gesture_0.gesture_description((gesture_0.get_gesture())))
if gesture_0.GestureUp:
print('up')
wait(1)
wait_ms(2)
gesture_0.begin()
print(gesture_0.get_gesture())
print(gesture_0.gesture_description((gesture_0.get_gesture())))
gesture_0.set_gesture_highrate(True)
print(gesture_0.GestureNone)