Page 1 of 1
logic function
Posted: Tuesday 09 May 2017 13:11
by Arkie
Hello, i want an action to be performed when i push a button for 3 times within 5 sec.
How can i manage this?
Regards
Re: logic function
Posted: Tuesday 09 May 2017 17:57
by asjmcguire
You need to use LUA - you can't do this in Blockly, but you can use the lastupdate value and time difference functions in LUA to achieve this.
Re: logic function
Posted: Sunday 14 May 2017 22:14
by Domosapiens
You could try something like this:
Define 2 dummy buttons
Push1 with Off_delay of 5 sec.
Push2 with Off_delay of 4 sec.
Assume you push button named Push
Blockly:
Code: Select all
If Push=on And Push1=off
Set Push1=on
ElseIf Push=on And Push1=on
Set Push2=on
ElseIf Push=on And Push1=on And Push2=on
<perform action>