Servo Trouble with BS2SX - yes my pulsout value is correct!
stupidservos
Posts: 2
I hope somebody can help me with this.
I am trying to control a servo with the BS2SX but I cannot get it to do anything except bang against one of the stops·(always moving in the same direction).· I have tried a futaba servo, as well as a hitec servo and have tried all the code I can find on the net for servo control but it's always the same thing.· The servo has the correct leads connected to a 4.8V battery pack, with only the white signal wire connected to pin14 on the bs2sx.· This code should move from one extreme to the other·and back to center, but it only goes to one side and tries to keep going?!· I would appreciate any help on this.
This is the code I'm using:
' {$STAMP BS2sx}
' {$PBASIC 2.5}
counter VAR Word
FOR counter = 1 TO 150
PULSOUT 14, 2500
PAUSE 20
NEXT
FOR counter = 1 TO 150
PULSOUT 14, 1250
PAUSE 20
NEXT
DEBUG "Center 12 o'clock", CR
FOR counter = 1 TO 150
PULSOUT 14, 1875
PAUSE 20
NEXT
DEBUG "All done."
END
I am trying to control a servo with the BS2SX but I cannot get it to do anything except bang against one of the stops·(always moving in the same direction).· I have tried a futaba servo, as well as a hitec servo and have tried all the code I can find on the net for servo control but it's always the same thing.· The servo has the correct leads connected to a 4.8V battery pack, with only the white signal wire connected to pin14 on the bs2sx.· This code should move from one extreme to the other·and back to center, but it only goes to one side and tries to keep going?!· I would appreciate any help on this.
This is the code I'm using:
' {$STAMP BS2sx}
' {$PBASIC 2.5}
counter VAR Word
FOR counter = 1 TO 150
PULSOUT 14, 2500
PAUSE 20
NEXT
FOR counter = 1 TO 150
PULSOUT 14, 1250
PAUSE 20
NEXT
DEBUG "Center 12 o'clock", CR
FOR counter = 1 TO 150
PULSOUT 14, 1875
PAUSE 20
NEXT
DEBUG "All done."
END
Comments
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
·