Button lock
-
Hi! I am having a problem while using different functionalities of the M5stack buttons.
- 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?
- 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.
-
Can you post your code please?
-
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
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