Probably the easiest way to do what you want to would be something like this (I'm not even going to try for proper syntax, so watch out):
MainLoop:
Serin (blah blah blah)
If kill_switch then skip_all:
blah
blah 'code to do stuff
blah
blah
blah 'code to do more stuff
blah
skip_all:
serout (pwm1, pwm2, etc.)
Goto MainLoop:
This was written (poorly, by a programmer who hasn't slept in days) in "old-style" PBASIC... 2.0, whoo... so.. tired... eyes so heavy... must program robot... make it clean my room... ::yawn::
