Hello,
Im trying to compress my program as much as possible as I require the space,
Ive coded up a sub routine that a repeatedly use through out the program,
However I require to return if a pin is high or continue with the for loop until the pin is high, is this possible?
Please see example below;
main: high testpoint
pause 1000
low testpoint
gosub Passcheck
goto idle
Passcheck: FOR b0 = 0 to 100
if starttest = 1 then return **** HERE IS THE ISSUE, I only want to return from sub if startest = 1, if starttest = 0 then I want to continue loop until fail
pause 50
Next b0
goto Fail
Please assist
Im trying to compress my program as much as possible as I require the space,
Ive coded up a sub routine that a repeatedly use through out the program,
However I require to return if a pin is high or continue with the for loop until the pin is high, is this possible?
Please see example below;
main: high testpoint
pause 1000
low testpoint
gosub Passcheck
goto idle
Passcheck: FOR b0 = 0 to 100
if starttest = 1 then return **** HERE IS THE ISSUE, I only want to return from sub if startest = 1, if starttest = 0 then I want to continue loop until fail
pause 50
Next b0
goto Fail
Please assist