servos only move in one direction
HavoKane
Posts: 109
regardless of the programming, the servos only move the robot foreward, ive adjusted the values and such, but they wont change direction or speed. and ive tried adjusting the servos, itll change direction, but still not according to the programming
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "running"
counter VAR Byte
FOR counter = 1 TO 122
PULSOUT 12, 650
PULSOUT 13, 850
PAUSE 20
NEXT
FOR counter = 1 TO 122
PULSOUT 12, 850
PULSOUT 13, 650
PAUSE 20
NEXT
END
END
Post Edited (HavoKane) : 7/21/2006 2:21:43 AM GMT
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "running"
counter VAR Byte
FOR counter = 1 TO 122
PULSOUT 12, 650
PULSOUT 13, 850
PAUSE 20
NEXT
FOR counter = 1 TO 122
PULSOUT 12, 850
PULSOUT 13, 650
PAUSE 20
NEXT
END
END
Post Edited (HavoKane) : 7/21/2006 2:21:43 AM GMT
Comments
1) does "running keep showing up on the DEBUG screen? ( more than once)
2) what happens if you use 750 as the PULSOUT value in all cases?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Larry) : 7/22/2006 1:49:13 AM GMT
1. no
2. same thing
Ok-- the first test was to see if a surge of power was resetting the Stamp. often, when this happens, the act of resetting will cause a short pulse which will act as a command to the servo, Repeatd resets will tend to move a servo ibn the same direction. You apparently don't have this problem.
The second behavior indicates that you haven't "centered" your servo. I don't know what kind you have or how they were modified for continuos rotation, but there should be a way to adjust them so a pulse of 750 gives little or no motion. check the literature that came with your robot or the bild directions you are following. It usually involves adjusting a Pot internal to the servo.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1) Does "running" keep showing up on the DEBUG screen? (more than once)
YES
2) What happens if you use 750 as the PULSOUT value in all cases?
Nothing - I think the servos are centered OK.
I do not have fresh batteries, of course :frown:, but will change them tomorrow and post an update.
If there is anything else to check, I'd be happy to try it!
That means your Stamp is constantly resetting. Most likely cause? You guessed it: low batteries.
ALL CLEAR with a fresh set of 4 AAs, and servos behaving as expected -
Very cool to find this old post that was exactly what I needed!
Thanks erco, and Larry before you...