🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    No files ever work with the Speaker

    Scheduled Pinned Locked Moved UIFlow
    2 Posts 1 Posters 848 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      michael.koppelman
      last edited by

      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] ENOENT
      

      a 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.

      1 Reply Last reply Reply Quote 0
      • M Offline
        michael.koppelman
        last edited by michael.koppelman

        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.

        1 Reply Last reply Reply Quote 0

        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
        • First post
          Last post