This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

button long press and short press detect

Hi, I want to detect long and short press in same button. Define "BUTTON_DETECTION_DELAY" can detect one delay. Let me know to detect more than two delays.

Parents
  • I think Nikita was onto the answer for you. Start a 3 second timer when the button is pushed. When the timer expires if the button is still pushed perform your system off actions. If the button released event occurs before the timer expires, cancel the timer and do your short button push actions.

  • @John DeWitt: Hi John, could you please share an example regrading this to handle the events for different cases of button press. Please

    Thanks n Regards

Reply Children
No Data
Related