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?
2 out of 2
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
No merge into master in the last 5 years, should we use development?
General Discussion • 23 Sept 2024, 17:48 • kiesel 5 days ago -
ESP-NOW
General Discussion • 22 Apr 2018, 05:58 • NeverDie 17 Feb 2025, 22:24 -
Human presence sensors....
General Discussion • 31 Jan 2025, 10:54 • skywatch 9 Feb 2025, 19:36 -
Code Garage to the rescue.
General Discussion • 11 Jan 2025, 11:25 • skywatch 23 Feb 2025, 14:57 -
Why is the output of ACS712 current measurement module unchanged?
General Discussion • 19 Jul 2021, 09:09 • Tessie T about 24 hours ago