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

    Button lock

    Scheduled Pinned Locked Moved Micropython
    3 Posts 2 Posters 6.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.
    • T Offline
      tialm
      last edited by

      Hi! I am having a problem while using different functionalities of the M5stack buttons.

      1. So I have a program where when I longpress the B button I go to a certain menu. In that menu when I (normal) press B button it starts a function that uses the NCIR unit (makes 10 temperature readings and then stops). But some strange thing is happening.When I press the B button to make the readings, at the end of the readings it will call the Long Press function again and I don't want this to happen. Is this the supposed behavior?
      2. Also, if I have a longpress assigned and for example a loop that keeps on going if a button is pressed using the isPressed function at the end of that loop the longpressed function will be called anyway... How can I avoid this?
        Thank you for the help! Let me know if my question is confuse and I can make it in other way.
      1 Reply Last reply Reply Quote 0
      • ajb2k3A Offline
        ajb2k3
        last edited by

        Can you post your code please?

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • T Offline
          tialm
          last edited by

          Sorry! @ajb2k3 I have not forgot about this, I am a bit withou time, a lot to do for work right now!
          But I'll sketch up an example soon!
          Thank you for the help

          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