Shop OBEX P1 Docs P2 Docs Learn Events
pulsout command — Parallax Forums

pulsout command

studiomagicstudiomagic Posts: 10
edited 2007-12-05 04:55 in BASIC Stamp
Can anyone tell me the command to pulsout pins 13 and 14 at the same time for servo?
I triedthis only 14 will work.
FOR Counter 1 to 150
PULSOUT 13, 14, 1000
PAUSE 20

Thanks,
Jim

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-12-05 04:43
    If you're trying to pulse two servos, they don't need to be pulsed simultaneously. You can pulse one, then the other, then wait 20ms and repeat. OTOH, if both servos must always receive the same pulse width, you can also just connect their control leads together and drive them with a single pin.

    -Phil
  • studiomagicstudiomagic Posts: 10
    edited 2007-12-05 04:51
    Thanks Pil,

    ·I will also be moving them one at a time as well. Can you show me the correct way to type that command to move them at the same time. I guess I'm not following you.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-12-05 04:55
    LOW 13
    LOW 14
    FOR Counter = 1 TO 150
      PULSOUT 13, 1000
      PULSOUT 14, 1000
      PAUSE 20
    NEXT
    
    
    
Sign In or Register to comment.