i need a xdrive v5 code file preferably in vex code text ill change my wiring to what ever u have just i need help with a code that controls movement on one stick and rotation on another please
Just looking around on the forum found this post for vex coding studio. Since the commands are the same in vexcode it should help. There are also other comments in this thread that could be helpful.
I would really encourage you to take some time to figure this out.
First, you have your 4 motors. I would set them all so that forward is to the front of your bot.
Look at the four channels on your controller. You will use the left stick to control movement, and the right stick on channel 1 to control spin. This setup actually works really well.
So, the front left wheel… When Ch3 is positive (up), then the motor should move forward. When channel 4 is positive (right), the front left wheel will also move forward. Finally, look at channel 1. When channel 1 is positive, (left) the bot will spin clockwise, so the front left wheel will be positive again.
So frontLeft should really be Ch3 + Ch4 + Ch1. Every wheel will be the sum or difference of these three channels. I assume your bot is built, so you can grab your bot and move it around to see what direction the wheels will turn when you press your stick in the desired direction.
The following is NOT correct, but gives you an idea of what to do.