Im looking for some help with differential steering, i have a ps2 controller hooked up to an arduino and working but i cant figure out how to convert x,y from the joystick into steering with 2 motors.
I could hack it and create “zones” but im sure theirs a more elegant way.
I have searched but cant find a solution, Im sure theirs a algorithm for it out there somewhere.
Assuming your numbers from the joystick give positive X to the right and negative X to the left, positive Y forward (up), negative Y backward (down), you might try this:
leftMotorSpeed = Y+X
rightMotorSpeed = Y-X
I haven’t tried this. I just came up with it. So who knows…