titaniumnitratecoatedcow
Member
i have 2 peices of code for a remote and servo The only difference i can see is the labels and variables used, but only the first one works.
Code:
init:
servo b.3, 80 ;set the initial servo position @ position 80
arm:
irin b.2,b0
debug
if b0=16 then arm_up
if b0=17 then arm_down
goto arm
arm_up:
servopos b.3,180 ;change the servos position without reseting the timer
pause 500
goto arm
arm_down:
servopos b.3,80
pause 500
goto arm
Code:
start3:
servo b.3, 80 ;set the initial servo position @ position 80
arm1:
irin b.2,b4
debug
if b4>=16 then up
if b4<17 then down
goto arm1
up:
servopos b.3, 180 ;change the servos position without reseting the timer
pause 500
goto arm1
down:
servopos b.3,80
pause 500
goto arm1