What is your wheel config?
Here is the code I've done for off season projects, you may want to add dead zones. This also does not have the power problems -
Code:
if (ws.ButtonState.Two == true)
{
leftmotorcontrol.motors[0].Velocity = -100 * (ws.AccelState.Values.X - ws.AccelState.Values.Y + turn); // front left
leftmotorcontrol.motors[1].Velocity = -100 * (ws.AccelState.Values.X + ws.AccelState.Values.Y + turn); // rear left
rightmotorcontrol.motors[0].Velocity = 100 *(ws.AccelState.Values.X + ws.AccelState.Values.Y - turn); // front right
rightmotorcontrol.motors[1].Velocity = 100 * (ws.AccelState.Values.X - ws.AccelState.Values.Y - turn); // rear right
}
else
{
leftmotorcontrol.motors[0].Velocity = 0.00;
leftmotorcontrol.motors[1].Velocity = 0.00;
rightmotorcontrol.motors[0].Velocity = 0.00;
rightmotorcontrol.motors[1].Velocity = 0.00;
}
The if statement is a safety measure
I was using a wiimote so the "joystick values" (Really i used the accelerometers) gave an output of -1 to 1, you get a 0 - 255?. Its really simple just add up the x,y,z(rotation) and give each wheel the values they need.Diagrams help alot.
Are you using two or one joystick?
Take a look at this thread -
http://www.chiefdelphi.com/forums/sh...hlight=wiimote
PM me if you need more help