Shop OBEX P1 Docs P2 Docs Learn Events
Reset a Servo? — Parallax Forums

Reset a Servo?

Circuit SmasherCircuit Smasher Posts: 2
edited 2006-08-20 17:05 in General Discussion
If you issue the following PBASIC command, the servo will turn to it's mid point:

PULSOUT rx_tiltServo, 750

Is it possible to somehow move the servo to some position and make it use that as it's mid point?

The reason I am asking is because I built a pan/tilt mechanism, but the servo that tilts up and down does not have it's mid point where I wanted it.· I can take the whole thing apart and fix it, but if there is a way to handle this in code or adjust the servo, I would like to do that instead.· Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-20 17:05
    You have to figure out the pulse width for the "mid-point" you want, give that width a constant name like "Center" and use that
    Center = 755
    
    PULSOUT rx_tiltServo,Center
    PULSOUT rx_tiltServo,Center+10
    PULSOUT rx_tiltServo,Center-10
    
    
Sign In or Register to comment.