UIFlow Guide
每隔一秒播放一个语调持续一秒,并调节音量到6
from m5stack import *
from m5ui import *
from uiflow import *
import time
import hat
setScreenColor(0x111111)
hat_spk2_0 = hat.get(hat.SPEAKER_I2S)
while True:
hat_spk2_0.playTone(220, 1, volume=6)
wait(1)
hat_spk2_0.playTone(247, 1, volume=6)
wait(1)
hat_spk2_0.playTone(131, 1, volume=6)
wait(1)
wait_ms(2)
hat_spk2_0.playCloudWAV('', volume=0)
hat_spk2_0.playTone(220, 1, volume=0)
hat_spk2_0.playTone(220, 1, volume=0)
/
hat_spk2_0.playWAV('', rate=44100, data_format=hat_spk2_0.F16B, channel=hat_spk2_0.CHN_LR, volume=0)