This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Number of "Pulses" Detection
#3
(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!
Reply


Messages In This Thread
Number of "Pulses" Detection - by p_xatzi - 04.10.2021, 11:06
RE: Number of "Pulses" Detection - by Daniel - 04.10.2021, 11:17
RE: Number of "Pulses" Detection - by p_xatzi - 04.10.2021, 14:15
RE: Number of "Pulses" Detection - by p_xatzi - 25.10.2021, 11:12
RE: Number of "Pulses" Detection - by admin - 25.10.2021, 11:35
RE: Number of "Pulses" Detection - by admin - 26.10.2021, 08:18
RE: Number of "Pulses" Detection - by p_xatzi - 26.10.2021, 09:31
RE: Number of "Pulses" Detection - by admin - 26.10.2021, 09:39
RE: Number of "Pulses" Detection - by p_xatzi - 31.10.2021, 22:15
RE: Number of "Pulses" Detection - by admin - 01.11.2021, 07:32
RE: Number of "Pulses" Detection - by p_xatzi - 20.04.2022, 07:22
RE: Number of "Pulses" Detection - by admin - 20.04.2022, 07:36
RE: Number of "Pulses" Detection - by p_xatzi - 20.04.2022, 08:23

Forum Jump: