Running a servo through its paces
Archiver
Posts: 46,084
Greetings,
I am testing a servo to be sure I understand how it functions.
When I run the program below the servo only responds to the first "for
j" loop. If I change the first pulsout to 0,200 (after first getting it
to position with 0,100) the servo swings through 90 degrees as I would
expect. Why doesn't it swing first to the 100 position then 150 and 200?
Thanks, Theron Wierenga
Symbol i = b10
Symbol j = w4
dirs = %11111111
loop: for j = 1 to 50
pulsout 0,100 ' 150 to center
pause 20
next
pause 500
for j = 1 to 50
pulsout 0,150
pause 20
next
for j = 1 to 50
pulsout 0,200
next
goto loop
I am testing a servo to be sure I understand how it functions.
When I run the program below the servo only responds to the first "for
j" loop. If I change the first pulsout to 0,200 (after first getting it
to position with 0,100) the servo swings through 90 degrees as I would
expect. Why doesn't it swing first to the 100 position then 150 and 200?
Thanks, Theron Wierenga
Symbol i = b10
Symbol j = w4
dirs = %11111111
loop: for j = 1 to 50
pulsout 0,100 ' 150 to center
pause 20
next
pause 500
for j = 1 to 50
pulsout 0,150
pause 20
next
for j = 1 to 50
pulsout 0,200
next
goto loop