![]() |
problem with the default code
I ran into a problem with the default code from IFI. The drive pwm out puts are the same for each side when the joystick is moved only in the Y-axis where that should be the case for the X-axis.
|
Re: problem with the default code
X axis is left and right. Y axis is front and back. When you move the joystick along the Y axis, you want the robot to move straight forward or backward. That requires controlling the motors on both sides identically.
The default code is doing what it is designed to do, and it is correct. |
Re: problem with the default code
yes that I realize. Right now I have one side wired backward so it will go straight. I know that is not FIRST legal.
|
Re: problem with the default code
What do you mean wired backward. If you mean the M+ to the black wire coming off the motor and the red to the M- this is completely legal we have done it in first many times before.
|
Re: problem with the default code
Thanks thats a relief.
|
Re: problem with the default code
Quote:
|
Re: problem with the default code
You can switch the X-axis in the default code by subtracting p1_x value from 255.
Example: Code:
Limit_Mix(2000 + p1_y + (255 - p1_x) - 127); |
Re: problem with the default code
Quote:
But I say leave the wires "backwards" and let the processor have a few extra cycles for other things. Heck, the victors aren't labeled this year, so just put your own lables on them, and have the N+ and M- switched on those to prevent confusion. |
| All times are GMT -5. The time now is 02:48. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi