Let's Make Robots!

Parallax Servo troubles

Ok i am having troubles working with this servo on my robot.  It is the same as the start here robot.  i type in the code

Servo 0,150

ans it barely moves then i type in

Servo 0,225

and it barely moves then i type in the whole code and it keeps turning and turning and it won't stop.

 The servo is a parallax continous rotation one.  I played around with the screw on the bottom and it has slowed it down and turned directions but nothing really.

any help will be nice


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

there is a syntaz error and i am triing to figure it out

edit: i have figured out a new code that i use and here it is and also i got a new servo. A Traxxas for remote controlled nitro trucks.

here is the code

 symbol servopin = 0


b0 = 150 : gosub pulseto

pause 1500

b0 = 225 : gosub pulseto

pause 1500

b0 = 150 : gosub pulseto

pause 1500

b0 = 75 : gosub pulseto

goto main

 for b1 = 1 to 20
 pulsout servopin, b0
 pause 20



I've just tested your code in my BoeBot :

I just had to change your symbol line to      -->  servopin PIN 12

 and it works properly.. the zero value being around 770, it makes my servo rotate at full speed for half a second


i tried what you said and it did not work.   I am going to keep triing different codes


could it be that i did not short the wires where the sharp sensor go?  I have the other sensor in.  i think that it is srf04 or something.

So what micro are you using? What battery? Or batteries? How is everything hooked up?

If this is a PICAxe, I think some have said that 150 is a sort of center position, where not much movement should be expected if the servo is "centered" with the pot adjustment. "Servo 0, 150" can be used to initialize pin 0 to output pulses continuously, and  should be close to a stop, or at least adjust the pot so it is stopped at this pulse width. But after that I think there is one more thing that must be done, using the statement "Servopos 0, 225" to drive the servo one direction, then "Servopos 0, 75" to turn the wheel the other direction.

From code the PICAxe commands manual :

init: servo 4,75  ‘ initialise servo
main: servopos 4,75  ‘ move servo to one end
         pause 2000  ‘ wait 2 seconds
         servopos 4,225  ‘ move servo to other end
         pause 2000  ‘ wait 2 seconds
         goto main  ‘ loop back to start

the parallax servos are working with this type of code:



FOR counter=1 TO 24

    PULSOUT 12,r_zero+150

    PULSOUT 13,l_zero-150

    PAUSE 20





where r_zero and l_zero are constant representing the zero speed values  (around 770) 

Actually i read over the the start here robot and its saids need a standard servo so i am going to get  a standard servo but if anyone knows how to control it please tell me.



An unmodified servo can be used to point the sensor different directions, but a continuous servo can be used to drive the wheels that moves the robot around. BOth would be driven with similar commands.