No files ever work with the Speaker
-
I've loaded a small, mono, 16-bit, 44.1kHz audio file into flash in UFlow 2.0. It plays fine within UFlow. No matter what I do, I get an ENOENT error trying to read the file.
Traceback (most recent call last): File "<stdin>", line 26, in <module> File "<stdin>", line 18, in loop OSError: [Errno 2] ENOENTa snippet of the code from the Python side of things:
def setup(): global rgb M5.begin() Widgets.setRotation(1) Widgets.fillScreen(0x222222) rgb = RGB() Speaker.begin() Speaker.setVolumePercentage(0.5) def loop(): global rgb M5.update() Speaker.playWavFile('/flash/res/audio/test1.wav') if Speaker.isPlaying(): rgb.fill_color(0xffffff) time.sleep(2)No code I've downloaded from other people works either! I can play tones out of the speaker, I can read images out of flash. I cannot read audio files out of flash.
-
This is because UIFlow2.0 sucks with the M5Go. Almost no hardware works. I would abandon all the silly BS and go right to PlatformIO if you want to avoid pulling your hair out.
This ecosystem is so convoluted. I thought I might buy these for presents for kids. No way. Your average parent could not make this shit work ever.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login