Try this-- UNTESTED
Code:start: 'look at switches on Port A IF (switchCW = 1) and (switchCCW = 1) then GOTO HOME ELSE GOTO LOOP ENDIF GOTO start HOME: Position = 150 Pulsout servo, Position pause 18 GOTO start loop: if SwitchCW = 0 then Position = 130 Pulsout servo, Position Pause 18 endif If SwitchCCW = 0 then Position = 170 pulsout servo, Position Pause 18 endif Pause 18 Goto loop





Bookmarks