long push, short push detection with a button (connected on gpio)

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: long push, short push detection with a button (connected on gpio)

#11 Post by vader » 01 Jan 2018, 10:53

Use my rule in the wiki and you can press the button as long as you want....
Pmn wrote: 01 Feb 2017, 20:57 Hi,

Yes, I got that working by using the rules section.
Let the button start a timer-rule. (where you can specify your long-push time)

Code: Select all

On Switch#Switch1=1.00 do
timerSet,1,2   (where 2 is the long push time in seconds)
endon

On Rules#Timer=1 do
if [Switch#Switch1]=1.00
 gpio,15,1
 else
 gpio,16,1
endif
endon


Post Reply

Who is online

Users browsing this forum: Google [Bot] and 84 guests