Double click | Hold for buttons
-
Couldn't find any examples on utilising hold or double clicks for the buttons on my sensor nodes. With all the wifi lamps around it would be great to control them via the mysensor nodes and controller
-
No, I can't recall any examples for for double click or hold either.
-
Maybe this will help: http://jmsarduino.blogspot.be/2009/10/4-way-button-click-double-click-hold.html
-
I have short and long press status reports on my switch class here. There are example sketches one directory up in the tests area. Double click gets more complicated because you have to decide are you going to delay reporting the press/release from the first click until enough time has passed for it not to be a double click? Or do you report the press/release from the first click, and then report a double click? I'd be surprised if there aren't a lot of arduino double-click switch examples around...
-
https://github.com/mathertel/OneButton
This is what I use for this.
-
@vorowski said:
https://github.com/mathertel/OneButton
This is what I use for this.Mind sharing some mysensors code to see how you got it implemented?
-
Hi, it is some time since I made this (and used it to be honest) but you can check this post where I integrated what you are asking about.
https://forum.mysensors.org/topic/4552/sleeping-while-waiting-for-double-click-delayed-sleep/3Node and the code is unfortunately not in use currently so I do not recall all the details, but maybe you can get something out of it
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Which device I have to use to connect with accelerometer before connecting to my pc?
General Discussion • 24 Jan 2023, 17:16 • Yada Kijsathan 15 days ago -
Running out of nodeId's
General Discussion • 3 Sept 2024, 07:33 • NielBierman 25 Jan 2025, 17:19 -
Email notifications received twice
General Discussion • 6 Feb 2023, 16:15 • Jodaille 4 days ago -
Code Garage to the rescue.
General Discussion • 11 Jan 2025, 11:25 • skywatch 23 Feb 2025, 14:57 -
No merge into master in the last 5 years, should we use development?
General Discussion • 23 Sept 2024, 17:48 • kiesel 6 days ago