Shop OBEX P1 Docs P2 Docs Learn Events
servo problem — Parallax Forums

servo problem

ThirteenevenThirteeneven Posts: 11
edited 2009-08-25 14:54 in BASIC Stamp
Hi
I have a parallax standard servo that seems try to correct itself when it gets to it needed position which makes it look like its vibrating. Is this normal, and how do I fix it? This is my code
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
FOR counter = 1 TO 150
PULSOUT 13, 780
PAUSE 5
NEXT
start:
FOR counter = 1 TO 150
PULSOUT 13, 1000
PAUSE 5
NEXT
FOR counter = 1 TO 150
PULSOUT 13, 550
PAUSE 5
NEXT
STOP
josh

Post Edited (Thirteeneven) : 8/25/2009 2:34:51 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-25 14:54
    Try changing the PAUSE 5 to PAUSE 20.

    Servos are designed for the control pulses to occur about 50 times a second (roughly 20ms apart).
Sign In or Register to comment.