Re: 4 Motor Arcade Driving Control
Totally a long over-due reply, but coding in a simpler version at some point needs to be provided. (Hah, Mathew, how about looking now. . . ? sorry)
This is the coding we used for our holonomic drive, but it's pretty much the same. We wanted to be able to strafe, so arcade drive was pretty much a must. (We need it for states. Go 1231E!)
Other note: We placed our drives on our second controller, and of course all teams do not need to. If something went wrong, we wanted to still be able to shoot, even if we wouldn't be able to move. (Pre-loads, whoop, whoop!)
The first part, vexRT[Ch3Xmtr2] is to make the robot go forward. Pretty simple.
The second part allows the robot to turn. The - and + tell the robot how the motors should run, telling them to either run normally (+) or inversly (-).
The third part was made for our strafeing. Anyone with a regular drive needn't worry about this. But it follows the same principle as going forward and backwards. (The - or + can easily be determined by checking which way your wheels spin. Remember the rules of a holonomic drive when coding!
PM me with any questions! Bug