A Basic Question
Hi fellows.
I am a new member and new to this area. I was doing the servo tutorial in WAM. After completing the chapter I am still not sure about two things
Typical loops are
FOR counter = N1 TO N2
··· PULSOUT 3 duration
··· PAUSE time
NEXT
What is the relation between "duration" and the number of degrees that the horn turns?
What is the relation between N1,N2 and "time" with where the horn ends up.
It seems that I don't know much about the servos. Can you suggest a simple reference readily available.
Thanks
Nader
I am a new member and new to this area. I was doing the servo tutorial in WAM. After completing the chapter I am still not sure about two things
Typical loops are
FOR counter = N1 TO N2
··· PULSOUT 3 duration
··· PAUSE time
NEXT
What is the relation between "duration" and the number of degrees that the horn turns?
What is the relation between N1,N2 and "time" with where the horn ends up.
It seems that I don't know much about the servos. Can you suggest a simple reference readily available.
Thanks
Nader
Comments
PULSOUT ServoPin, 750
... as 750 times 2 microseconds is 1.5 milliseconds.
Servos need to be periodically refreshed; the typical period is 20 milliseconds. This is the value you'll usually see for 'time' in your loop example.
Finally, N1 and N2 allow that loop to run for a given number of iterations. If, for example, you wanted to move the servo horn full right for about 1 second, you might you values of 1 for N1 and 45 for N2. Why 45? Well, full right means a 2 millisecond pulse to the servo, plus I have a 20 millisecond pause between pulses. So each loop iteration takes about 22 milliseconds. If I divide 1000 milliseconds (1 second) by 22 you get 45.
Keep pressing through with WAM. It's a great book and when you're done you'll know a lot a be very confident in your skills.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Nader