BUTTON statement without repeat rate variable?
Hello.
I have certain project, which uses 11 buttons. They have no repeat, but BUTTON statement requires separate BVAR variable (button variable) to be declared for all buttons. Is there a way to skip usage of this variable?
I know that I can do without BUTTON statement at all, but I like they way it works (debounce and code stopped until you release button).
Re: BUTTON statement without repeat rate variable?
A quick check of the manual does not show the square brackets "[ ]" typically used to denote optional parameters; perhaps one might use the same variable on all buttons however- presuming it is initialized to zero before each use.
Code:
If Button = pressed then
pause 100 'debounce
HOLDINGBUTTON: If Button = Pressed then 'still depressed
pause 100 'wait for release of button
Goto HOLDINGBUTTON
Elseif Button = NotPressed
Do something
EndIf
Endif