No announcement yet.

Using Joysticks to Control Servos

  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Joysticks to Control Servos

    We are attempting to use the joysticks on our controller two to move servos but are having some difficulty getting them to work. Does anyone have any experience with this or ideas on how to make this work? Any suggestions are much appreciated!

  • #2
    If you mean you can control the servos with the first gamepad but not the second are you using gamepad2.(whatever button/stick you're using) to get data from the second gamepad?
    If you mean you can't control a servo at all have you looked at the ConceptScanServo example in external samples?


    • #3
      is this continuous or angular? Also tell about what response you expect from servo when joystick full forward, full backward, zero or intermediate position. You can very well control servo using joystick but may not ideal for angular servo


      • #4
        If I understand, you want the joysticks to control the SPEED that the servos move, but while motors accept a speed/power input, servos expect a POSITION input. You need to convert your stick inputs into a desired speed in 'servo units / second' , then multiply that speed by the elapsed time since your last loop iteration to get the next servo step size, then add this step size to the servos current position to get a new commanded position, and repeat.