Shop OBEX P1 Docs P2 Docs Learn Events
Calling Subroutines? — Parallax Forums

Calling Subroutines?

bennettdanbennettdan Posts: 614
edited 2006-08-09 10:41 in BASIC Stamp
Hey guys,
·· I have a program that uses two different inputs #1 joystick and #2 RC radio controller I have two different programs that work with each one to control a servo but I would like to put a switch on it and then control the servos according to what position the·switch is·in. Can I use the·IF THEN , ELSEIF statement to make it call·two different subrotines one with the Joystick VAR or the other with the RC·controller VAR.

Like This?

DO
IF IN0 = 1 THEN
GOSUB Joystick
ELSE
GOSUB RC Controller
LOOP

Comments

Sign In or Register to comment.