Shop OBEX P1 Docs P2 Docs Learn Events
Using PWM to control servo — Parallax Forums

Using PWM to control servo

ArchiverArchiver Posts: 46,084
edited 2001-11-13 14:03 in General Discussion
Hi all,

Wondering if any of you know how to control the precise degree of
motion for servo motor using Basic Stamp 2.

For duty cycles of 0 to 127, I turn in one direction and from 128 to
255 duty cycles, I turn in another direction. But I do not know how
to control the angle of turning.

How does the number of cycle affect the angle of turning as well as
the speed of turning?

Sample Program
PWM 0, 0, 50 ' 50 cycles of PWM at 0/255 duty
PAUSE 2000

Thanks for the Help

Comments

Sign In or Register to comment.