UIFlow Guide
Plays a tone every second for a duration of one second, setting the volume to 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)