UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import unit
setScreenColor(0x222222)
vibrator_0 = unit.get(unit.VIBRATOR, unit.PORTA)
def buttonA_wasPressed():
# global params
vibrator_0.off()
pass
btnA.wasPressed(buttonA_wasPressed)
def buttonB_wasPressed():
# global params
vibrator_0.on(10)
pass
btnB.wasPressed(buttonB_wasPressed)
vibrator_0.off()
vibrator_0.on(10)