View Single Post
  #4   Spotlight this post!  
Unread 20-01-2014, 17:10
jee7s jee7s is offline
Texan FIRSTer, ex-frc2789, ex-frc41
AKA: Jeffrey Erickson
FRC #6357
 
Join Date: Nov 2007
Rookie Year: 1997
Location: Dripping Springs, TX
Posts: 319
jee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond repute
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