|
ermm....
that may possibly be the most complicated way to do anything i have ever seen..
a button is nothing more than a if-then loop
example, using p1_sw_trig :
(the trigger swich on the joystick plugged into P1)
---------------------------------------------
panicbutton: 'lables the loop (neatness)
if p1_sw_trig = 1 then mysub: 'if button is pressed then goto sub
goto endsub: 'if it isnt.. then dont
mysub: 'put whatever you want the
out 8 = 1 'button to do here
out8 = 1 'this example Turns on some LED's
out9 = 1
out10 = 1
endsub: resumes the rest of the code
----------------------------------------------
as for infinite loops.. you really cant do that unless you use a do while loop, wich pretty much is the same structure. Rbayer posted a discription of the commands in the Pbasic programming section, you may want to check that out!
~Pyro
and you may want to avoid the Serin/out things.. you really dont need more than 2 at most
__________________
Squee!
-=-=-=-==-=-=-=-==-=-=-==-
Team 263, Aftershock:
Alumni, guy who comes back and fixes Krass's mistakes
|