servo question

sid

Senior Member
Hi all,
Using a servo for the first time
I want to make the servo travel from one side to the other very slowley
using the code below...
Code:
symbol delay=30

start:
servo 2,150
pause 1000
for b1 = 150 to 180
servopos 2,b1
pause delay
next b1
pause 1000

for b1 =180 to 150
servopos 2,b1
pause delay
next b1
pause 1000
goto start
I can get the servo to travel slowly in the 150>180 direction but in the 180>150 direction it just whiz's back to the start position.
I would be grateful if someone could advise how I can get the servo to travel slowly in "both directions"

Rgds,
Sid
 
Top