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
  • 9

  • General Discussion   1 Mar 2024, 23:03

    3
  • 4

  • General Discussion   5 Jun 2024, 15:55

    15

  • General Discussion   22 Jul 2024, 06:11

    2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts