Thread: Motor Code Help
View Single Post
  #1   Spotlight this post!  
Unread 14-02-2010, 14:46
buddyb's Avatar
buddyb buddyb is offline
Registered User
FRC #1885 (ILITE)
Team Role: Programmer
 
Join Date: Dec 2009
Rookie Year: 2008
Location: Haymarket, VA
Posts: 65
buddyb has a spectacular aura aboutbuddyb has a spectacular aura aboutbuddyb has a spectacular aura about
Re: Motor Code Help

Quote:
Originally Posted by odel View Post
But I need two joysticks running 4 motors, 2 motors to each joystick.
Like ByteIt said, you'll want to do robotDrive.TankDrive(leftJoystick, rightJoystick);

But, the constructor you'll want to use is:
Code:
RobotDrive(SpeedController *frontLeftMotor, SpeedController *rearLeftMotor, SpeedController *frontRightMotor, SpeedController *rearRightMotor, float sensitivity=0.5)
This will give you tank drive for 4 motors from two joysticks.

Good luck!
__________________
FRC - Team 1885 - Programmer.

Last edited by buddyb : 14-02-2010 at 14:49.
Reply With Quote