|
Re: Can't get motors to spin correct way.
I think most of us reading that need a bit more context, namely what types all of those variables are and where you tried to make your changes that didn't work.
Particularly:
1. What is the type of LeftMotors and RightMotors?
2. What is the type of Joystick1 and Joystick2?
If LeftMotors and RightMotors are a variant of a speed controller, and Joystick1 and Joystick2 are Joysticks, then code like this would work:
LeftMotors.Set(Joystick1.GetY());
RightMotors.Set(Joystick2.GetY());
And if you needed to reverse the right motors you would replace with this:
LeftMotors.Set(Joystick1.GetY());
RightMotors.Set(-1.0 * Joystick2.GetY());
But, like I said, a bit more context to your question would be helpful.
__________________
2013 Alamo Regional Woodie Flowers Finalist Award Winner
2012 Texas Robot Roundup Volunteer of the Year
Texas Robot Roundup Planning Committee, 2012-present
FRC 6357 Mentor, 2016-
FRC 2789 Mentor, 2009-2016 -- 2 Golds, 2 Silvers, 8 Regional Elimination Appearances
FRC 41 Mentor 2007-2009
FLL Mentor 2006
FRC 619 Mentor 2002
FRC 41 Student 1998-2000
|