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 -
Combination of networks
General Discussion • 1 Feb 2025, 17:30 • Sniker 4 Feb 2025, 01:02 -
Which device I have to use to connect with accelerometer before connecting to my pc?
General Discussion • 24 Jan 2023, 17:16 • Yada Kijsathan 13 days ago -
Code Garage to the rescue.
General Discussion • 11 Jan 2025, 11:25 • skywatch 23 Feb 2025, 14:57 -
Human presence sensors....
General Discussion • 31 Jan 2025, 10:54 • skywatch 9 Feb 2025, 19:36 -
Email notifications received twice
General Discussion • 6 Feb 2023, 16:15 • Jodaille 3 days ago