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?



  • 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
 

Suggested Topics

  • 4
  • 3
  • 8
  • 9
  • 20
  • 17

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts