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

    Header and Buttons Only

    Scheduled Pinned Locked Moved M5EZ
    2 Posts 2 Posters 8.5k Views 1 Watching
    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.
    • bobmixonB Offline
      bobmixon
      last edited by

      Greetings,

      First and foremost, thank you Rop for writing this library, saved me a ton of time.

      I'm currently working on a M5Stack Gray application and want only the header, and a couple buttons; I'll add task code (yield) or interrupts later. I first want to get the UI working.

      I have no issues getting the header to display as I wish.
      I have no problems getting the buttons to display.

      However, I am not able to read the buttons. Calling the ez.buttons.poll() in my loop does not ever return any key pressed.

      Can you please show me an example of just a header, buttons and a means of retrieving the pressed button.

      Thank you!

      Bob Mixon
      #Maker

      1 Reply Last reply Reply Quote 0
      • RopR Offline
        Rop
        last edited by Rop

        Hi Bob,

        I don't check this forum that regularly, so you're kind of lucky I see this. It's best to open an issue on the M5ez github.

        As for your question: ez.buttons.poll() should return the key pressed, or an empty string if nothing is pressed, so you are presumably calling it from inside a loop? If you have nothing else to do in that loop and just want the the code to wait for a keypress, use ez.buttons.wait() instead. Let me know if this was not the issue, and in that case maybe show the code.

        Rop

        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