|
Re: Programmer a motor with a trigger
i tried that, but here let me give you the code i tried and maybe you could find somethign thats wrong
RobotDrive* myRobot;
Jaguar* leftmotor;
Jaguar* rightmotor;
myRobot = new RobotDrive(1, 2);
leftmotor = new Jaguar(1);
rightmotor = new Jaguar(2);
if (!ds->GetDigitalIn(ARCADE_MODE)) {
myRobot->TankDrive(leftStick, rightStick);
}
else {
myRobot->ArcadeDrive(leftStick);
}
if (rightStick->GetRawButton(1)) {
leftmotor->Set(-0.5);
rightmotor->Set(0.5);
}
else {
leftmotor->Set(0.0);
rightmotor->Set(0.0);
}
that's what i have, can someone please help tell me why the left motor doesnt work when i do this. if i have both positive numbers, then the left motor goes in reverse
__________________
"I would love to change the world but no one will give me the source code"
|