Shop OBEX P1 Docs P2 Docs Learn Events
Lego compatible servo can drive wheels from a Stamp — Parallax Forums

Lego compatible servo can drive wheels from a Stamp

Hello!
Okay I built this thing out of Lego and one of the brown dog's servos.

I am adapting this code:

' RotateParallaxCrServo.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}

counter VAR Word
servoPin PIN 15             ' change I/O pin for servo signal here

 Fward:
FOR counter = 1 TO 100      ' Rotate counterclockwise for ~3 seconds

  PULSOUT servoPin, 850
  PAUSE 20

NEXT

FOR counter = 1 TO 100      ' Hold still for ~3 seconds

  PULSOUT servoPin, 900

  PAUSE 20

NEXT

 FOR counter = 1 TO 100      ' Rotate clockwise for ~3 seconds

  PULSOUT servoPin, 900
  PAUSE 20

NEXT

GOTO Fward

So of course it runs but, ah, I'm not completely sure of what the servo is doing when running. Incidentally that thing is one of two from this discussion:
https://tinyurl.com/46p4dzpr

It is certainly a starter.
Oh and the mascots are watching it run.

Comments

  • If you look in the boe-bot manual there is plenty servo code to play with. You can download the manual for free.

  • @xanaphyst said:
    If you look in the boe-bot manual there is plenty servo code to play with. You can download the manual for free.

    Also true and you win the prize for responding, however I don't know how much a big bucket of bantha milk will be to you.

    However my aim in buying them was first to replicate the boe-bot in Lego and use those servos for that purpose. The problem was first in finding wheels that fit the servos. I've completed that step. The wheel shown in that photo does in fact fit the axle of the servo. Originally Adafruit sold a small robotic base in circular format and declared how to drive the motors included in the kit. One method was the Feather platform that they sell, another was the Pi, both included various types of H-driver for the motors of course. Our discussion here concluded that there was no room on the platform for the full sized CR ones sold here and a matching BASIC stamp design. I've now come to conclusion that it is possible to drive these CR servos that way and apply them appropriately. And they are https://tinyurl.com/crservoorange

    My next venture will be to construct platform that does approximately what that platform did, but around these two.
    A mascot is watching.

  • ServoPAL (#28824): Servo Pulser and Timer

    General Description
    The ServoPAL is a tiny module that plugs in between your BASIC Stamp and two servo motors to pulse
    the motors so your PBASIC program doesn’t have to. In addition, it provides an “alarm clock” function to
    perform timing in the background while the BASIC Stamp is busy with other tasks.

  • @xanaphyst said:
    ServoPAL (#28824): Servo Pulser and Timer

    General Description
    The ServoPAL is a tiny module that plugs in between your BASIC Stamp and two servo motors to pulse
    the motors so your PBASIC program doesn’t have to. In addition, it provides an “alarm clock” function to
    perform timing in the background while the BASIC Stamp is busy with other tasks.

    Hello!
    You are quite sure of that catalog gem? Because the website is avoiding it. I believe I did see it described in an earlier version of the site, but not recently. But will keep looking.
    Sleeping mascots stay sleeping.

Sign In or Register to comment.