|
PBasic Probelm
Hi,
I have 3 push buttons that I am using as a switches. I am using last year's robot controller. What I want to do is when I press a button once, I want it to be like a toggle button. When I press a button, I want the controller to run a sub routine. That is simple, I know, but here is the catch:
If while running the sub-routine, a second button is pressed, I want the RC to ignore the second button. When the RC is done executing the subroutine, then I want it to be able to recieve a signal from any other button, but not until it is done executing the first sub routine.
Also, I forgot, in PBasic, is this how you used to do sub routines?
IF condition THEN
gosub FIRST
ENDIF
FIRST:
'code
Is that all there is to it or do I have to declare the sub routine in a different way or end the sub routine in a different way. I'll appreciate any help.
|