Different joystick mapping?

Hi I have a programming question regarding programming joysticks.

For as long as I’ve done robotics, I’ve always done, and taught direct drive.
After browsing through the forums for a while, I hear more and more about alternative methods of joystick mapping.

So how do I implement different mappings to the joystick?

Is it through like a LUT or Hashing or what?

There’s a good article over here: http://www.vexmen.com/2011/11/whats-your-robot-drive-style/

In my opinion, tank drive is really the best way. It’s easy to code, simple to control, and offers maximum control. Some gamers prefer arcade drive but I find it so much more difficult to control.

Sort of mean beyond these drive styles.

Programmed tank, arcade, and the different holonomic drives.

Referring more towards an alternative in assigning values from the joystick to the motors than just a direct mapping such as:


void tankDrive() 
      motor[port1] = vexRT[Ch3]; 
      motor[port10] = vexRT[CH2]; 

void arcadeDrive() 
      motor[port1] = vexRT[Ch3] - vexRT[Ch4]; 
      motor[port10] = vexRT[Ch3] + vexRT[Ch4];

I think he means the different control curves that people keep discussing. Like where you remap the motor power to increase linearly as the joystick is pushed. I might be wrong, though.

If we’re discussing how to drive the robot, my personal favourite means of controlling the robot is using the accelerometers in the Joystick. I want to see if it’s feasible for competition use this year at some early scrimmages.

That’s it. Didn’t know how to word it properly.

I did try using the accelerometers one time, it was actually really fun, just the code I used for it was really bad.

My bad. There’s two ways this can be done - either using a LUT or a simple equation.

Here’s an equation example: https://vexforum.com/showpost.php?p=139660&postcount=3
You can mess around and come up with other curves that suit your robot better.

As for the LUT, 24C did a great job explaining how they did theirs and for your reference, joystick mapping typically refers to “which button does what”**Edit: **