Shop OBEX P1 Docs P2 Docs Learn Events
Servos — Parallax Forums

Servos

TebosTebos Posts: 11
edited 2009-05-04 22:40 in Robotics
I am trying to test some servos with the code in some of the manuals.· They are the continuouse rotation servos running off a supper carrier board and a BS2.

CODE:

·' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter VAR Word
FOR counter = 1 TO 122 ' Clockwise just under 3 seconds.
PULSOUT 15, 850
PAUSE 20
NEXT
FOR counter = 1 TO·40 ' Stop one second.
PULSOUT 15, 750
PAUSE 20
NEXT
FOR counter = 1 TO 122 ' Counterclockwise three seconds.
PULSOUT 15, 650
PAUSE 20
NEXT
END


The problem is that the servo never stops it just does a stutter after 3 secs and continous to rotate in the same direction.· It never goes counterclockwise.· Is this a code issue or a power issue?· I hooked it up to the carrier board·+5 and it still does not do what i want.· does it need the 6v max to function properly?·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-04 19:36
    Usually that means that something has happened to the power source and the Stamp has reset. You should be seeing your DEBUG message appearing over and over again with each stutter.
  • TebosTebos Posts: 11
    edited 2009-05-04 22:40
    Thank you for the info, it was the power supply.· I was using a wall power supply that was not adaquate but, everything is fine with new supply.· Thanks again =)
Sign In or Register to comment.