November 21, 2024, 11:16:07 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Continuous rotation servos

Started by Clad In Shadows, April 25, 2007, 11:17:16 PM

Previous topic - Next topic

Clad In Shadows

I have one of those laying around the house.
Can this servo be used with a prop-1 , and if so , is there some type of test code to see how it works?

Thanks.

JonnyMac

You can connect a C/R servo to a Prop-1 -- just understand that it can only be used for rotating things, not for position.  Here's a simple demo (connect the servo to P0).

' {$STAMP BS1}
' {$PBASIC 1.0}

SYMBOL  Servo           = 0

SYMBOL  speed           = B2
SYMBOL  hold            = B3

Reset:
  LOW Servo

Main:
  FOR hold = 1 TO 25
    PULSOUT Servo, 150                  ' stop
    PAUSE 20
  NEXT

  FOR hold = 1 TO 25
    PULSOUT Servo, 100                  ' spin
    PAUSE 20
  NEXT

  FOR hold = 1 TO 25
    PULSOUT Servo, 150                  ' stop
    PAUSE 20
  NEXT

  FOR hold = 1 TO 25
    PULSOUT Servo, 200                  ' spin (reverse)
    PAUSE 20
  NEXT

  GOTO Main
Jon McPhalen
EFX-TEK Hollywood Office

Clad In Shadows

Thanks Jon , will experiment with it.