The default code for single joy stick drive is
pwm01 = Limit_Mix(2000 + p1_y + p1_x - 127);
pwm02 = Limit_Mix(2000 + p1_y - p1_x + 127);
however with this code our robot turns right when joystick is forward , and goes forward when the joy stick is pushed to the left.
Mathematically
pwm01 = Limit_Mix(2000 + p1_y + p1_x - 127);
pwm02 = 254-Limit_Mix(2000 + p1_y + p1_x - 127);
would solve the problem, assuming 254 is the maximum value for the PWM since I dont have the robot with me I can not tell if this will work. Could you please tell me if this will work, if not could you please tell me why or point me in the right direction.
Thank you
James
. From what i learned tonight is that Limit_Mix is a function. I didnât know if you knew that or not?? I donât see though why your joystick is doing that. We are currently using a older joystick that was i think in the 2003 kit, we havenât really messed with using the new ones. So i donât know if it is just a problem with the new ones or not. I assume you are using the new joysticks that came in the kit? Also if i was you i would check the wiring going to the speed controllers and from the speed controllers, there could be a problem there.