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?
1 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 3 Oct 2024, 14:18 -
Old hardware migration
General Discussion • 29 Feb 2024, 03:43 • dbemowsk 1 Mar 2024, 23:03 -
Anybody got one / a few spare minimalist rfm69hw shields for wemos d1 mini?
General Discussion • 20 Sept 2024, 08:45 • kiesel 11 Oct 2024, 15:32 -
GatawayESP8266 - Compile error
General Discussion • 18 May 2021, 11:50 • skom 5 Jun 2024, 15:55 -
How to great variables
General Discussion • 16 May 2024, 14:43 • wint0178 22 Jul 2024, 06:11