|
That is correct, the BUTTON command is not valid as it relies on having a switch hooked up to one of the pins on the Stamp, which they aren't. What you need is a simple if statement.
2.0:
...
if p4_sw_aux1=0 then dontKill
gosub killLoop
dontKill:
...
serout
goto mainloop
killLoop:
if p4_sw_aux1=1 then keepKilling
return
keepKilling:
Serin...
Serout...
goto killLoop:
2.5:
...
if p4_sw_aux1=1 then gosub killLoop
...
serout
loop
killLoop:
do
serin...
serout...
while p4_sw_aux1=1
return
|