UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
setScreenColor(0x222222)
speaker.setVolume(90)
speaker.sing(220, 1)
speaker.tone(1800, 200)
speaker.tone(1800, 200)
speaker.setVolume(1)
speaker.sing(220, 1)
from m5stack import *
from m5stack_ui import *
from uiflow import *
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
speaker.playTone(554, 1, volume=6)
speaker.playTone(554, 1, volume=6)
from m5stack import *
from m5stack_ui import *
from uiflow import *
import time
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
speaker.playWAV("res/ding.wav", volume=6)
wait(1)
speaker.playWAV('res/ding.wav', rate=44100, data_format=speaker.F16B, channel=speaker.CHN_LR, volume=6)
speaker.playTone(554, 1, volume=6)
speaker.playWAV("res/ding.wav", volume=6)
speaker.playWAV('res/ding.wav', rate=44100, data_format=speaker.F16B, channel=speaker.CHN_LR, volume=6)
res/filename.wav
or SD card /sd/filename.wav
, and specify the sample rate and audio data format and channel at the same time.speaker.playWAV("res/ding.wav", volume=0)
speaker.playCloudWAV('https://xxxxx.wav', volume=6)