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

    Header and Buttons Only

    M5EZ
    2
    2
    6.6k
    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
      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
        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
        • First post
          Last post