Programming joystick buttons to move window motors for a arm.

This is my teams rookie year and i have been place as Head Programmer.

Our dream for our robot is to have a arm run by the window motors that raises and lowers on top of our robot. We have the arm all set up but have no idea how to get the arm to move. Both our joysticks are already used for other task so we need to use the buttons on our second joystick to change the position. We would like to also have fixed positions but that is not a necessity we just need it to move.

The window motors (2) are connected to the victor motor controllers in pwm port 6 with a y pwm cable.

Any other information needed?

Thanks in advanced!

This question comes up often enough, I would think it would be easy to search for the answer. In case you can’t hit on the right combination of keywords, this thread should help:

Thank you very much i programmed it and it worked right away

Now the next question comes up. Did copying the code shown in the linked thread just get it working for you, or did you actually understand it enough to build and expand on it next time? I truly hope that latter.

I understood it once I figured out what the code is. I can easy now shift and mold this code to whatever needs to be controlled by buttons.