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

    Tab5 - Speaker init after crash (using Arduino IDE)

    Scheduled Pinned Locked Moved PRODUCTS
    3 Posts 2 Posters 1.8k 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.
    • A Offline
      aleekwen
      last edited by

      If my sketch crashes for any reason, I lose the ability to hear anything from the speaker. to rectify, I need to

      a) Turn Tab 5 off (power button)
      b) Connect headset to jack and turn on Tab 5
      c) I can now hear sounds on the headset;
      d) Disconnect the headset
      e) Sounds on the external speaker now plays

      This is quite cumbersome and being able to do this programmatically would be a big win. ChatGPT is not able to figure this out.

      I notice @felume has a "SetSpeakerEnable" in his repo but I cannot get this to work either https://github.com/felmue/M5Tab5/blob/main/src/M5Tab5.cpp#L101

      Just wondering if anyone has observed this behavior and have any software workarounds.

      thanks!

      felmueF 1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue @aleekwen
        last edited by

        Hello @aleekwen

        I am testing with the speaker sample code in M5Unified and then force a crash. And yes, after the automatic reboot the speaker is silent. However a short press on the power/reset button brings the speaker back.

        The only thing I noticed, is, that when the battery is attached I sometimes need to reset M5Tab5 twice before the speaker comes back.

        BTW: after a reboot the call to M5.begin() automatically enables the speaker; there is no need to call M5Tab5.SetSpeakerEnable(true).

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          aleekwen @felmue
          last edited by

          @felmue Yes thanks this is my current workaround (I did have the battery so I just take it out). Speaker is very loud. I guess I just have to avoid any crashes : )

          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