Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1716
    Anonymous
    Inactive

    Hi, I need some help with getting my project up and running. I’m trying to get four separate motors to run with my arduino uno., and ps2 controller. basically I’m going to have one motor on each wheel and pan and tilt servos for a camera. I can get the controller to work with the psx2 code but don’t know how to modify the code for all four motors and servos. I’m looking to control forward and back, left and right, with the left joy stick, and pan and tilt with the right joy stick. I just got my arduino about two weeks ago, i have tried some random codes on the net, but just had two outputs for motors and i could never get the motors to stay still when not pressing on the joy sticks . thanks any help would be great!

    #1732
    Bill
    Member

    There’s a lot of theory you are missing out on to get your desired results. This first is Dead-Band. Most controllers don’t sit still very well when not being touched, so there numbers jump around a bit. If the value reported from the controller is suppose to be 128 when the stick is in the middle, it might jump around from 130 to 125 in real life. So you would have to write your code to say “If value is between 125 to 130, stop motors” to handle this actuality. This is the controllers dead band.

     

    Hopefully this help. I don’t have time to write the code for you, but I can try to point you in the right direction.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.