Shop OBEX P1 Docs P2 Docs Learn Events
Parallax standard servo — Parallax Forums

Parallax standard servo

BadgerBadger Posts: 184
edited 2008-08-20 03:37 in BASIC Stamp
Hello

how do you get this servo to reverse I have tried what is in the book and only can get it to swing one direction



The Badger

Comments

  • WhitWhit Posts: 4,191
    edited 2008-08-20 03:15
    Hey Badger,

    When you say "the book," do you mean What's a Microcontroller, Chapter 4? If that is not what you mean - start there first.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • SRLMSRLM Posts: 5,045
    edited 2008-08-20 03:16
    A bit more information would be nice. What's your code? Make sure that you try values between 1 ms and 2 ms, and on both sides of 1.5 ms.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-08-20 03:17
    This sweeps a standard one way then the other, repeatedly.· Don't play with servos much, but this made it happen for me.

    DO
      value = 2200
      FOR x = 0 TO 30
        GOSUB dispserv
        NEXT
     
      PAUSE 1000
     
      value = 400
      FOR x = 0 TO 30
        GOSUB dispserv
        NEXT
     
      PAUSE 1000
     
    LOOP
     
    
    dispserv:
      PULSOUT 14, (value/2)   ' servo pin
      PAUSE 15
      RETURN
    
  • BadgerBadger Posts: 184
    edited 2008-08-20 03:37
    Hey all

    thanks for the code and the advise and yes i mint the what is a microcontroller but it is late and i do take a lot of pain meds due to my disabilities and i just did not read far enough ahead. i think i skipped that section I am sorry to have jumped the gun.. i will lean

    the Badger
    Phil
Sign In or Register to comment.