UIFlow Guide
每隔一秒加强一次震动强度
from m5stack import *
from m5ui import *
from uiflow import *
import time
import hat
setScreenColor(0x111111)
hat_vibrator_0 = hat.get(hat.VIBRATOR)
while True:
hat_vibrator_0.set_duty(10)
wait(1)
hat_vibrator_0.set_duty(30)
wait(1)
hat_vibrator_0.set_duty(50)
wait(1)
hat_vibrator_0.set_duty(70)
wait(1)
hat_vibrator_0.set_duty(100)
wait(1)
hat_vibrator_0.turn_off()
wait(1)
wait_ms(2)
hat_vibrator_0.set_duty(50)
hat_vibrator_0.set_freq(10)
hat_vibrator_0.turn_off()