Help with Joystick Axes and Sensitivity
This is our first year as a team for the FIRST competition, and needless to say, we are having some problems with the programming aspect of our robot.
I have been working with the user_routine.c file quite a bit lately, and my first task was to combine our two motors onto one joystick. The code we used was successful, but we believe that our axes are defined wrong. When we push the control forward, our robot turns left. When we push it right, it goes forward, etc. In short, our code must define forward and backward is as the x-axis, and lateral control as the y-axis. Though this could simply be solved by turning our joystick 90 degrees, we would rather solve the problem through our code.
Furthermore, our joystick control is hypersensitive. We realize that this is a common problem this year, but most of the discussions are geared toward programming veterans. We were able to code for a 'turbo' button, which was just an alteration of the scale of the joysticks, but are not fond of this idea. We have found several discussions on exponential or sine curves to define motor power, and are interested in pursuing this option, though we are unsure of how and where to implement it in our code.
My team and I appreciate any help that you can provide. We are noobies when it comes to programming, so a slightly 'dumbed down' version, or simply a file that we can compile and play around with would be greatly appreciated. If you have any questions or requests, feel free to leave them in a post, send me an e-mail, or contact me via AIM.
Thanks,
Bryan
|