04.10.2021, 14:15
(04.10.2021, 11:06)p_xatzi Wrote: Hi,
Is there an easy way to recognize number of "button presses" in a specific time period.
What I want to do is to apply different scenario if client presses a specific button one time and another scenario if he presses button twice in a defined time interval.
Thanks in advance!
Hi,
Thanks for the reply!
I have only some basic knowledge of coding so as far as the practical side is concerned let me know if i get it right:
1. I have to program push button to sent 1 on press and 0 on release on knx bus.
2. On value 1 of push button telegram (button "press"), time stamp of new event is captured
3. On value 0 of push button telegram (button "relased"), counter is increased by 1 and event script is executed. First of all sleep function is activated to wait for the result to come from switcher function for specified period (1 sec).
4. After this period (1 sec) the result (that is edje down ("realeases") detections) is read. If time period has expired the result will be 0.
May I ask:
In case of 2nd edje down detection during period, due to new event script call, the desired command will be executed 1 sec later.
So, suppose we have second pulse edje detection almost at the end of time period is it true that a slight delay (of 1 sec) may be present?
I will test and ask for more help is something goes wrong.
Thanks again!