code errors?
alucard
Posts: 4
·i need help
i been working on my own home made 12 servo biped robot. one of the smalls and lights of it kind... but to i start to try to program it and i have soo many problems trying to get 2 servo to move together here a simple please check it and tell me if iam worng
fas var word
faw var word
fx· var word
aas var word
aaw var word
ax· var word
fas = 1500
faw = 1000
aas = 100
aaw = 500
low 14
low 15
start:
for fx = fas to faw
for ax = aas to aaw
PULSOUT 14,fx
PULSOUT 15,ax
pause 45
next
GOTO start2
start2:
for fx = faw to fas
for ax = aas to aas
PULSOUT 14,fx
PULSOUT 15,ax
pause 45
next
GOTO start
how do i make to servo move like this?
·
i been working on my own home made 12 servo biped robot. one of the smalls and lights of it kind... but to i start to try to program it and i have soo many problems trying to get 2 servo to move together here a simple please check it and tell me if iam worng
fas var word
faw var word
fx· var word
aas var word
aaw var word
ax· var word
fas = 1500
faw = 1000
aas = 100
aaw = 500
low 14
low 15
start:
for fx = fas to faw
for ax = aas to aaw
PULSOUT 14,fx
PULSOUT 15,ax
pause 45
next
GOTO start2
start2:
for fx = faw to fas
for ax = aas to aas
PULSOUT 14,fx
PULSOUT 15,ax
pause 45
next
GOTO start
how do i make to servo move like this?
·
Comments
·· In each line you have two FOR routines, but only one NEXT...Also, try lowering your PAUSE from 45 to 20.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
for fx = fas to faw
for ax = aas to aaw
PULSOUT 14,fx
PULSOUT 15,ax
pause 45
next
next would work right?
GOTO start2
·· Yes, it would work without the extra text after the NEXT command.· Also you should set the PAUSE statement down to 20.· Dracula fan?·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com