single-click, double-click, long-press button possible with MySensors?



  • Hi all,
    has anyone yet implemented some kind of multi tap button with MySensors?
    Such as single-click, double-click, long-press, ... ?

    I think, I cannot work with interrupts, as I can get a HIGH/LOW once only and cannot count for long-press? Correct? And a battery mode node cannot be used either (with smartSleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR_2),...) because I have to check for e.g. a long-press which might last some seconds ...

    Thanks in advance for any comment or code example?


    Log in to reply
     


  • hey @dirkc, maybe you can trigger your interrupt to rising and falling edge and use millis() to see how long the press was?


Log in to reply
 

1 out of 2

Suggested Topics


  • Bug Reports   24 Mar 2014, 22:52

    4

  • General Discussion   4 Feb 2025, 01:02

    4
  • 5

  • General Discussion   23 Feb 2025, 14:57

    9

  • General Discussion   9 Feb 2025, 19:36

    13

  • General Discussion   3 days ago

    3

0
Online

11.5k
Users

11.1k
Topics

112.8k
Posts