![]() |
1 joystick controls not turning properly
When I load this code, the drive seems to mess up. Going forward and back is fine, but it won't turn to the correct side. When I turn "RIGHT" it turns "LEFT", when I turn "LEFT" it turns "RIGHT"
I've also tried switching the PWN cables but that just really messed up the controls because it was going backwards. Code:
Code:
|
Re: 1 joystick controls not turning properly
before the 1 joystick drive portion, do this:
p1_x = 254 - p1_x This will make the math controlling the 1-joystick drive believe that the joystick is facing the opposite direction than it is. |
Re: 1 joystick controls not turning properly
Quote:
Seriously, Bongle has a suggestion that will work. You could also fix it in hardware by swapping the motor connections on the output of the speed controllers. That will make the motors run in the proper direction. |
Re: 1 joystick controls not turning properly
Quote:
|
Re: 1 joystick controls not turning properly
This year, for some reason, every single one of our joysticks was giving us the wrong (opposite) 0-255 numbers on the x-axis. We had to flip it in code.
|
| All times are GMT -5. The time now is 00:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi